diff options
author | joerg <joerg> | 2011-09-24 12:58:55 +0000 |
---|---|---|
committer | joerg <joerg> | 2011-09-24 12:58:55 +0000 |
commit | 8bb6b753e6d05bd50e98d879ae21ca824afc6319 (patch) | |
tree | 91e639172e6862f3432a430d9f983de8d5aeff8a /pkgtools | |
parent | b165d609fd54e551b6a36186005d36beffa0cf9f (diff) | |
download | pkgsrc-8bb6b753e6d05bd50e98d879ae21ca824afc6319.tar.gz |
Simplify to not trigger non-literal format string warnings.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pbulk/files/pbulk/lib/read_child.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkgtools/pbulk/files/pbulk/lib/read_child.c b/pkgtools/pbulk/files/pbulk/lib/read_child.c index d2cf4f1a13e..abaac0d83cb 100644 --- a/pkgtools/pbulk/files/pbulk/lib/read_child.c +++ b/pkgtools/pbulk/files/pbulk/lib/read_child.c @@ -1,4 +1,4 @@ -/* $NetBSD: read_child.c,v 1.2 2007/06/25 21:38:44 joerg Exp $ */ +/* $NetBSD: read_child.c,v 1.3 2011/09/24 12:58:55 joerg Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. @@ -44,7 +44,6 @@ char * read_from_child(const char *dir, const char *cmd, const char * const *argv) { - const char *error; char *buf; size_t buf_len, cur_len; ssize_t bytes_read; @@ -66,11 +65,10 @@ read_from_child(const char *dir, const char *cmd, const char * const *argv) buf = xrealloc(buf, buf_len + 1); } if (bytes_read == -1) { - error = "read failed"; (void)close(fd); (void)kill(child, SIGTERM); (void)waitpid(child, &status, 0); - err(1, error); + err(1, "read failed"); } (void)close(fd); |