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
This commit is contained in:
parent
1c864688bb
commit
7db54a1f97
2 changed files with 2 additions and 2 deletions
|
@ -405,7 +405,7 @@ rb_epoll_sched_event_signalfd(struct ev_entry *event, int when)
|
||||||
struct sigevent ev;
|
struct sigevent ev;
|
||||||
struct itimerspec ts;
|
struct itimerspec ts;
|
||||||
|
|
||||||
memset(&ev, 0, sizeof(&ev));
|
memset(&ev, 0, sizeof(ev));
|
||||||
event->comm_ptr = rb_malloc(sizeof(timer_t));
|
event->comm_ptr = rb_malloc(sizeof(timer_t));
|
||||||
id = event->comm_ptr;
|
id = event->comm_ptr;
|
||||||
ev.sigev_notify = SIGEV_SIGNAL;
|
ev.sigev_notify = SIGEV_SIGNAL;
|
||||||
|
|
|
@ -412,7 +412,7 @@ rb_sigio_sched_event(struct ev_entry *event, int when)
|
||||||
if(can_do_event <= 0)
|
if(can_do_event <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
memset(&ev, 0, sizeof(&ev));
|
memset(&ev, 0, sizeof(ev));
|
||||||
event->comm_ptr = rb_malloc(sizeof(timer_t));
|
event->comm_ptr = rb_malloc(sizeof(timer_t));
|
||||||
id = event->comm_ptr;
|
id = event->comm_ptr;
|
||||||
ev.sigev_notify = SIGEV_SIGNAL;
|
ev.sigev_notify = SIGEV_SIGNAL;
|
||||||
|
|
Loading…
Reference in a new issue