From: Andrew Cooper Date: Tue, 21 Apr 2015 13:35:45 +0000 (+0100) Subject: signal: Don't use uninitalised sival_ptr X-Git-Tag: xen-4.6.1~21 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9b81761be03ac017bdb1a212e4b59de545853d2f;p=qemu-xen-unstable.git signal: Don't use uninitalised sival_ptr In 64bit builds, setting sival_int to 0 doesn't clear the upper half of the sival_ptr pointer. Valgrind does not like this. Signed-off-by: Andrew Cooper --- diff --git a/vl.c b/vl.c index 67d9d86771..c864e7de75 100644 --- a/vl.c +++ b/vl.c @@ -1568,7 +1568,7 @@ static void rtc_stop_timer(struct qemu_alarm_timer *t) static int dynticks_start_timer(struct qemu_alarm_timer *t) { - struct sigevent ev; + struct sigevent ev = { { 0 } }; timer_t host_timer; struct sigaction act; @@ -1578,7 +1578,6 @@ static int dynticks_start_timer(struct qemu_alarm_timer *t) sigaction(SIGALRM, &act, NULL); - ev.sigev_value.sival_int = 0; ev.sigev_notify = SIGEV_SIGNAL; ev.sigev_signo = SIGALRM;