aboutsummaryrefslogtreecommitdiff
path: root/pan
diff options
context:
space:
mode:
authorXiaoguang Wang <wangxg.fnst@cn.fujitsu.com>2014-06-24 15:11:38 +0800
committerCyril Hrubis <chrubis@suse.cz>2014-06-24 18:24:28 +0200
commit4d1098948f8fb0581bfdad8cfbf80337c133272c (patch)
tree6b2ae4dabb340b89d97ad604d928c9daa3c8673a /pan
parent241a313f64d5c4d32a3194830c6cdc6b9e0e0b7f (diff)
pan/ltp-pan.c: fix compilation warnings
Delete the useless 'char *av[2], bigarg[82];' definition. Fix the 'ignoring return value of read(2)' compilation warnings. Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Diffstat (limited to 'pan')
-rw-r--r--pan/ltp-pan.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c
index 6a1a79742..9324f47d4 100644
--- a/pan/ltp-pan.c
+++ b/pan/ltp-pan.c
@@ -453,13 +453,6 @@ int main(int argc, char **argv)
* this is an "active file cleanliness" thing
*/
{
- char *av[2], bigarg[82];
-
- memset(bigarg, '.', 81);
- bigarg[81] = '\0';
- av[0] = bigarg;
- av[1] = NULL;
-
for (c = 0; c < keep_active; c++) {
if (zoo_mark_cmdline(zoofile, c, panname, "")) {
fprintf(stderr, "pan(%s): %s\n", panname,
@@ -1026,7 +1019,8 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode,
char *termtype;
struct tms notime = { 0, 0, 0, 0 };
- read(errpipe[0], errbuf, errlen);
+ if (read(errpipe[0], errbuf, errlen) < 0)
+ fprintf(stderr, "Failed to read from errpipe[0]\n");
close(errpipe[0]);
errbuf[errlen] = '\0';
/* fprintf(stderr, "%s", errbuf); */