]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix clang warning
authorVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:46:24 +0000 (23:46 +0200)
committerVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:46:24 +0000 (23:46 +0200)
Properly initialize to avoid "Branch condition evaluates to a garbage value"
warning.

Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
lib/ptm_lib.c

index f50d1e2989a381cc4bb253c1bf7f1beda0fb1310..e881d49225e48a8f8beeb1513ef6cfb3d079080e 100644 (file)
@@ -330,7 +330,7 @@ int ptm_lib_process_msg(ptm_lib_handle_t *hdl, int fd, char *inbuf, int inlen,
        char client_name[32];
        int cmd_id, type, ver, msglen;
        csv_t *csv;
-       ptm_lib_msg_ctxt_t *p_ctxt;
+       ptm_lib_msg_ctxt_t *p_ctxt = NULL;
 
        len = _ptm_lib_read_ptm_socket(fd, inbuf, PTMLIB_MSG_HDR_LEN);
        if (len <= 0)