Fixed memory checker warnings to initalize structs fully.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 24 May 2007 12:32:25 +0000 (12:32 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 24 May 2007 12:32:25 +0000 (12:32 +0000)
lib/silcutil/silclist.h
lib/silcutil/unix/silcunixschedule.c

index cda1123f7fcfdf4338fa8bc1dcb97a32d00f32b8..81ea3638bd8a468c9a4501c9eb55c1e353c9932c 100644 (file)
@@ -104,6 +104,7 @@ do {                                                        \
   (list).next_offset = silc_offsetof(type, nextfield); \
   (list).prev_set = 0;                                 \
   (list).prev_offset = 0;                              \
+  (list).end_set = 0;                                  \
   (list).head = (list).tail = (list).current = NULL;   \
 } while(0)
 
@@ -143,6 +144,7 @@ do {                                                                \
   (list).next_offset = silc_offsetof(type, nextfield);         \
   (list).prev_offset = silc_offsetof(type, prevfield);         \
   (list).prev_set = 1;                                         \
+  (list).end_set = 0;                                          \
   (list).head = (list).tail = (list).current = NULL;           \
 } while(0)
 
index 579af8bf776ccda5967b48bfce6b952465a1e79d..42b32a95e4ddf78459265a63446ee981f190d9ac 100644 (file)
@@ -271,7 +271,7 @@ SilcBool silc_schedule_internal_schedule_fd(SilcSchedule schedule,
 
   SILC_LOG_DEBUG(("Scheduling fd %lu, mask %x", task->fd, event_mask));
 
-  event.events = 0;
+  memset(&event, 0, sizeof(event));
   if (event_mask & SILC_TASK_READ)
     event.events |= (EPOLLIN | EPOLLPRI);
   if (event_mask & SILC_TASK_WRITE)