From 3db3a003331b41794a494c8db954517a5a2bf930 Mon Sep 17 00:00:00 2001 From: "sven.panne@aedion.de" Date: Sun, 16 Sep 2007 11:19:27 +0000 Subject: [PATCH] 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 --- rts/posix/Itimer.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 1.7.10.4