[pisa-src] r1684 - trunk/pisacd/cdctx.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Fri, 13 Nov 2009 12:41:40 +0100

Author: tjansen
Date: Fri Nov 13 12:41:40 2009
New Revision: 1684

Log:
Initialize the whole structure to 0 and set different values explicitly
afterwards.

Modified:
   trunk/pisacd/cdctx.c

Modified: trunk/pisacd/cdctx.c
==============================================================================
--- trunk/pisacd/cdctx.c        Fri Nov 13 12:39:39 2009        (r1683)
+++ trunk/pisacd/cdctx.c        Fri Nov 13 12:41:40 2009        (r1684)
@@ -28,6 +28,8 @@
  */
 void cdctx_init(void)
 {
+       memset(&cd_ctx, 0, sizeof(cd_ctx));
+
        cd_ctx.flag_running = false;
        cd_ctx.flag_background = false;
        cd_ctx.flag_pending = false;
@@ -37,12 +39,6 @@
        cd_ctx.fd_control = -1;
        cd_ctx.fd_data = -1;
        cd_ctx.fd_pisaconf = -1;
-
-       cd_ctx.ctrlhandlers = NULL;
-       cd_ctx.natlist = NULL;
-       cd_ctx.conlist = NULL;
-
-       memset(&cd_ctx.scheduler, 0, sizeof(pisa_scheduler));
 }
 
 /**

Other related posts:

  • » [pisa-src] r1684 - trunk/pisacd/cdctx.c - Thomas Jansen