提交 f876c30c 编写于 作者: E Eric Blake

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.
上级 54456cc0
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册