0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 06:51:08 +01:00

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:
Jilles Tjoelker 2015-01-15 23:36:26 +01:00
parent 1c864688bb
commit 7db54a1f97
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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;