diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-12-09 10:43:37 +0100 |
---|---|---|
committer | Jesper Dangaard Brouer <brouer@redhat.com> | 2014-12-09 10:43:37 +0100 |
commit | fe266699b1c1ef90bffdd346a4e1624d66f901fb (patch) | |
tree | 83655399c38f3d91e259b8f6f5b65037bbb859f5 | |
parent | 909f2dfae2bf112332125ba2512b94df9c008da9 (diff) | |
download | ipvsadm-fe266699b1c1ef90bffdd346a4e1624d66f901fb.tar.gz |
ipvsadm: fix compile warning in modprobe_ipvs
ipvsadm.c: In function ‘modprobe_ipvs’:
ipvsadm.c:1249:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc;
^
Address this by also checking if waitpid(2) returned successfully
before we check actual status information.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
-rw-r--r-- | ipvsadm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1255,7 +1255,7 @@ static int modprobe_ipvs(void) rc = waitpid(child, &status, 0); - if (!WIFEXITED(status) || WEXITSTATUS(status)) { + if (rc == -1 || !WIFEXITED(status) || WEXITSTATUS(status)) { return 1; } |