From 7db54a1f9707fe68b5b4066ff0675772da6e1598 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Thu, 15 Jan 2015 23:36:26 +0100 Subject: [PATCH] libratbox: Fix sizeof in two memsets. This fixes a compiler warning. The necessary fields of the struct sigevent were initialized so there was no problem. Submitted by: Aaron (via IRC) Reviewed by: Attila --- libratbox/src/epoll.c | 2 +- libratbox/src/sigio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libratbox/src/epoll.c b/libratbox/src/epoll.c index 480ceed0..4f6b13e3 100644 --- a/libratbox/src/epoll.c +++ b/libratbox/src/epoll.c @@ -405,7 +405,7 @@ rb_epoll_sched_event_signalfd(struct ev_entry *event, int when) struct sigevent ev; struct itimerspec ts; - memset(&ev, 0, sizeof(&ev)); + memset(&ev, 0, sizeof(ev)); event->comm_ptr = rb_malloc(sizeof(timer_t)); id = event->comm_ptr; ev.sigev_notify = SIGEV_SIGNAL; diff --git a/libratbox/src/sigio.c b/libratbox/src/sigio.c index d63bffce..2419dd81 100644 --- a/libratbox/src/sigio.c +++ b/libratbox/src/sigio.c @@ -412,7 +412,7 @@ rb_sigio_sched_event(struct ev_entry *event, int when) if(can_do_event <= 0) return 0; - memset(&ev, 0, sizeof(&ev)); + memset(&ev, 0, sizeof(ev)); event->comm_ptr = rb_malloc(sizeof(timer_t)); id = event->comm_ptr; ev.sigev_notify = SIGEV_SIGNAL;