summaryrefslogtreecommitdiff
path: root/pkgtools/pbulk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2011-09-24 12:58:55 +0000
committerjoerg <joerg@pkgsrc.org>2011-09-24 12:58:55 +0000
commitd5610719ca926522fb6d30ca2dc32bbc29448726 (patch)
tree91e639172e6862f3432a430d9f983de8d5aeff8a /pkgtools/pbulk
parent0cdb4f59cccd30f49ada3bbd09bf3963e4c99737 (diff)
downloadpkgsrc-d5610719ca926522fb6d30ca2dc32bbc29448726.tar.gz
Simplify to not trigger non-literal format string warnings.
Diffstat (limited to 'pkgtools/pbulk')
-rw-r--r--pkgtools/pbulk/files/pbulk/lib/read_child.c6
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);