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

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

 



2011/6/6 Eric Blake <eblake@xxxxxxxxxx>:
> 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

ACK.

Matthias

--
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]