summaryrefslogtreecommitdiffstats
path: root/sys-utils/rtcwake.c
diff options
context:
space:
mode:
authorSami Kerola2015-06-06 23:41:51 +0200
committerKarel Zak2015-06-29 13:39:37 +0200
commit76037ac7d86964c8b554f7eb59ca8a95c41e0f3b (patch)
tree64df259f868b1f9f4000171378f89dada7efd48e /sys-utils/rtcwake.c
parentrtcwake: read accepted mode strings from /sys/power/state (diff)
downloadkernel-qcow2-util-linux-76037ac7d86964c8b554f7eb59ca8a95c41e0f3b.tar.gz
kernel-qcow2-util-linux-76037ac7d86964c8b554f7eb59ca8a95c41e0f3b.tar.xz
kernel-qcow2-util-linux-76037ac7d86964c8b554f7eb59ca8a95c41e0f3b.zip
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 <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/rtcwake.c')
-rw-r--r--sys-utils/rtcwake.c2
1 files changed, 1 insertions, 1 deletions
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