Skip to content

Commit

Permalink
dmq: more initialization of pointers at declaration of vars
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jan 8, 2015
1 parent b27c38b commit 4d52cc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/dmq/dmq.c
Expand Up @@ -75,12 +75,12 @@ sl_api_t slb;

/** module variables */
str dmq_request_method = str_init("KDMQ");
dmq_worker_t* workers;
dmq_worker_t* workers = NULL;
dmq_peer_list_t* peer_list = 0;
/* the list of dmq servers */
dmq_node_list_t* node_list;
dmq_node_list_t* node_list = NULL;
// the dmq module is a peer itself for receiving notifications regarding nodes
dmq_peer_t* dmq_notification_peer;
dmq_peer_t* dmq_notification_peer = NULL;

/** module functions */
static int mod_init(void);
Expand Down
2 changes: 2 additions & 0 deletions modules/dmq/notification_peer.c
Expand Up @@ -38,6 +38,8 @@ int *dmq_init_callback_done = 0;
int add_notification_peer()
{
dmq_peer_t not_peer;

memset(&not_peer, 0, sizeof(dmq_peer_t));
not_peer.callback = dmq_notification_callback;
not_peer.init_callback = NULL;
not_peer.description.s = "notification_peer";
Expand Down

0 comments on commit 4d52cc0

Please sign in to comment.