From: sven.panne@aedion.de Date: Sun, 16 Sep 2007 11:19:27 +0000 (+0000) Subject: Keep valgrind happy when calling timer_create X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3db3a003331b41794a494c8db954517a5a2bf930;p=ghc-hetmet.git Keep valgrind happy when calling timer_create Fill all of the sigevent structure with zeroes before individual fields are set. Although not strictly necessary, this keeps tools like valgrind from complaining about passing uninitialized data, which is a good thing. MERGE TO STABLE --- diff --git a/rts/posix/Itimer.c b/rts/posix/Itimer.c index 1fcfa16..a60f8f1 100644 --- a/rts/posix/Itimer.c +++ b/rts/posix/Itimer.c @@ -42,6 +42,8 @@ # include #endif +#include + /* Major bogosity: * * In the threaded RTS, we can't set the virtual timer because the @@ -143,6 +145,9 @@ initTicker (nat ms, TickProc handle_tick) { struct sigevent ev; + // Keep programs like valgrind happy + memset(&ev, 0, sizeof(ev)); + ev.sigev_notify = SIGEV_SIGNAL; ev.sigev_signo = ITIMER_SIGNAL;