summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-09-09 12:28:46 +0200
committerJose Bollo <jose.bollo@iot.bzh>2019-09-09 12:28:46 +0200
commit2ffa3fe4a1b7f7bf4f3a9f2552c740a0e290ee5b (patch)
tree34bdb1ab3b20697afe4ff2a280d194776a025143
parent42b7313906eda8e651f87decddfb18753ff576a4 (diff)
Fix missing new lines
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/fbuf.c10
-rw-r--r--src/filedb.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/fbuf.c b/src/fbuf.c
index 55b8230..c4243e6 100644
--- a/src/fbuf.c
+++ b/src/fbuf.c
@@ -86,7 +86,7 @@ error2:
close(fd);
error:
rc = -errno;
- fprintf(stderr, "can't read file %s: %m", name);
+ fprintf(stderr, "can't read file %s: %m\n", name);
fb->saved = fb->used = fb->size = 0;
return rc;
}
@@ -134,7 +134,7 @@ fbuf_open(
error:
rc = -errno;
- fprintf(stderr, "can't open file %s: %m", name);
+ fprintf(stderr, "can't open file %s: %m\n", name);
fbuf_close(fb);
return rc;
}
@@ -179,7 +179,7 @@ fbuf_sync(
error:
rc = -errno;
- fprintf(stderr, "sync of file %s failed: %m", fb->name);
+ fprintf(stderr, "sync of file %s failed: %m\n", fb->name);
return rc;
}
@@ -196,7 +196,7 @@ fbuf_ensure_capacity(
capacity = get_asz(count);
buffer = realloc(fb->buffer, capacity);
if (buffer == NULL) {
- fprintf(stderr, "alloc %u for file %s failed: %m", capacity, fb->name);
+ fprintf(stderr, "alloc %u for file %s failed: %m\n", capacity, fb->name);
return -ENOMEM;
}
fb->buffer = buffer;
@@ -266,7 +266,7 @@ fbuf_identify(
/* bad identification */
errno = ENOKEY;
- fprintf(stderr, "identification of file %s failed: %m", fb->name);
+ fprintf(stderr, "identification of file %s failed: %m\n", fb->name);
return -ENOKEY;
}
diff --git a/src/filedb.c b/src/filedb.c
index 9d75f40..ce37ad1 100644
--- a/src/filedb.c
+++ b/src/filedb.c
@@ -180,7 +180,7 @@ init_names(
p = realloc(ns, all * sizeof *ns);
if (p == NULL) {
free(ns);
- fprintf(stderr, "out of memory");
+ fprintf(stderr, "out of memory\n");
goto error;
}
ns = p;
@@ -197,7 +197,7 @@ init_names(
return 0;
bad_file:
- fprintf(stderr, "bad file %s", filedb->fnames.name);
+ fprintf(stderr, "bad file %s\n", filedb->fnames.name);
errno = ENOEXEC;
error:
return -1;
@@ -370,7 +370,7 @@ recoverdb(
}
return rc;
error:
- fprintf(stderr, "db recovery impossible: %m");
+ fprintf(stderr, "db recovery impossible: %m\n");
exit(5);
return rc;
}
@@ -435,7 +435,7 @@ index_itf(
if (!(up & 1023)) {
p = realloc(filedb->names_sorted, (up + 1024) * sizeof *p);
if (p == NULL) {
- fprintf(stderr, "out of memory");
+ fprintf(stderr, "out of memory\n");
return -1;
}
filedb->names_sorted = p;