From: Eric Blake Date: Wed, 8 Jun 2011 11:23:00 +0000 (-0600) Subject: build: silence coverity false positive X-Git-Tag: v0.9.3-rc1~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f876c30cfe09cb86bd4bdb019c89d2b9d9e3217f;p=thirdparty%2Flibvirt.git build: silence coverity false positive Similar in nature to commit fd21ecfd, which shut up valgrind. sigaction is apparently a nasty interface for analyzer tools, at least for how many false positives it generates. * src/util/command.c (virExecWithHook): Initialize entire var, since coverity gripes about the (unused and non-standard) sa_restorer. --- diff --git a/src/util/command.c b/src/util/command.c index 4e9ad8c6cc..0f8ff14acc 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -518,8 +518,8 @@ virExecWithHook(const char *const*argv, * so we need to temporarily block that again */ struct sigaction waxon, waxoff; + memset(&waxoff, 0, sizeof(waxoff)); waxoff.sa_handler = SIG_IGN; - waxoff.sa_flags = 0; sigemptyset(&waxoff.sa_mask); memset(&waxon, 0, sizeof(waxon)); if (sigaction(SIGPIPE, &waxoff, &waxon) < 0) {