Ideally, these would be fixed by coccinelle (see next commit),
but because of various reasons they aren't. Fix them manually.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
{
virNetDaemon *dmn;
#ifndef WIN32
- struct sigaction sig_action;
+ struct sigaction sig_action = { 0 };
#endif /* !WIN32 */
if (virNetDaemonInitialize() < 0)
dmn->autoShutdownTimerID = -1;
#ifndef WIN32
- memset(&sig_action, 0, sizeof(sig_action));
sig_action.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &sig_action, NULL);
#endif /* !WIN32 */
{
int origerrno;
int r;
- siginfo_t tmp;
+ siginfo_t tmp = { 0 };
if (SA_SIGINFO)
tmp = *siginfo;
- else
- memset(&tmp, 0, sizeof(tmp));
/* set the sig num in the struct */
tmp.si_signo = sig;