diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-01-04 13:14:51 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-01-04 13:16:00 +0100 |
commit | ad3b709ba48389731e8e5c3eeb280b8c089099fa (patch) | |
tree | 0dc80c904deb6c3d70f4be30ad97a9937b242399 | |
parent | f6d0988717c372a245c6d2769a53e678b02149d7 (diff) | |
download | ouroboros-ad3b709ba48389731e8e5c3eeb280b8c089099fa.tar.gz ouroboros-ad3b709ba48389731e8e5c3eeb280b8c089099fa.zip |
ipcpd: Initialize rnodes in ribmgr_ro_create
Fixes warnings by some compilers about possibly uninitialized access.
-rw-r--r-- | src/ipcpd/normal/ribmgr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipcpd/normal/ribmgr.c b/src/ipcpd/normal/ribmgr.c index d0bd3ec7..e52db08a 100644 --- a/src/ipcpd/normal/ribmgr.c +++ b/src/ipcpd/normal/ribmgr.c @@ -315,9 +315,9 @@ static struct rnode * ribmgr_ro_create(const char * name, char * saveptr = NULL; char * token = NULL; char * token2; - struct rnode * node; - struct rnode * new; - struct rnode * prev; + struct rnode * node = NULL; + struct rnode * new = NULL; + struct rnode * prev = NULL; bool sibling = false; int timeout; @@ -354,6 +354,7 @@ static struct rnode * ribmgr_ro_create(const char * name, } assert(token); + assert(prev); token2 = strtok_r(NULL, PATH_DELIMITER, &saveptr); if (token2 != NULL) { |