[PATCH 03/12] build: silence coverity false positive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similar in nature to commit fd21ecfd, which shut up valgrind.

sigaction is apparently a nasty interface for code analyzers.

* src/util/util.c (virExecWithHook): Initialize entire var, since
coverity gripes about the (unused and non-standard) sa_restorer.
---
 src/util/util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/util.c b/src/util/util.c
index e221abe..5672193 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -690,8 +690,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) {
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]