From 76037ac7d86964c8b554f7eb59ca8a95c41e0f3b Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 6 Jun 2015 22:41:51 +0100 Subject: 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 --- sys-utils/rtcwake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/rtcwake.c') diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c index ebfd420e2..a53ed48f9 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 -- cgit v1.2.3-55-g7522