From: Sami Kerola Date: Sat, 6 Jun 2015 21:41:51 +0000 (+0100) Subject: rtcwake: fix valgrind warning X-Git-Tag: v2.27-rc1~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76037ac7d86964c8b554f7eb59ca8a95c41e0f3b;p=thirdparty%2Futil-linux.git rtcwake: fix valgrind warning ==3445== Syscall param ioctl(generic) points to uninitialised byte(s) ==3445== at 0x4F16477: ioctl (in /usr/lib/libc-2.21.so) ==3445== by 0x402785: setup_alarm (rtcwake.c:231) ==3445== by 0x403302: main (rtcwake.c:520) Signed-off-by: Sami Kerola --- diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c index ebfd420e2e..a53ed48f9e 100644 --- a/sys-utils/rtcwake.c +++ b/sys-utils/rtcwake.c @@ -207,7 +207,7 @@ static int get_basetimes(struct rtcwake_control *ctl, int fd) static int setup_alarm(struct rtcwake_control *ctl, int fd, time_t *wakeup) { struct tm *tm; - struct rtc_wkalrm wake; + struct rtc_wkalrm wake = { 0 }; /* The wakeup time is in POSIX time (more or less UTC). Ideally * RTCs use that same time; but PCs can't do that if they need to