die: remove double newline, show path information for plumbitem() - sacc - sacc… | |
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit 42d4251ad320c40f328c7cee077e9f91dac39a6d | |
parent b9f7064a08d2e82307ab3d5a7824ce0bff038d66 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sun, 25 Feb 2018 15:51:18 +0100 | |
die: remove double newline, show path information for plumbitem() | |
Diffstat: | |
M sacc.c | 8 ++++---- | |
1 file changed, 4 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/sacc.c b/sacc.c | |
@@ -113,7 +113,7 @@ xmalloc(const size_t n) | |
void *m = malloc(n); | |
if (!m) | |
- die("malloc: %s\n", strerror(errno)); | |
+ die("malloc: %s", strerror(errno)); | |
return m; | |
} | |
@@ -135,7 +135,7 @@ xstrdup(const char *str) | |
char *s; | |
if (!(s = strdup(str))) | |
- die("strdup: %s\n", strerror(errno)); | |
+ die("strdup: %s", strerror(errno)); | |
return s; | |
} | |
@@ -582,8 +582,8 @@ plumbitem(Item *item) | |
clear(&path); | |
if (!tag) { | |
if (asprintf(&path, "%s/%s", tmpdir, file) < 0) | |
- die("Can't generate tmpdir path: ", | |
- strerror(errno)); | |
+ die("Can't generate tmpdir path: %s/%s: %s", | |
+ tmpdir, file, strerror(errno)); | |
} | |
} | |