summaryrefslogtreecommitdiff
path: root/print-lisp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2015-10-05 11:03:15 +0200
committerFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2015-10-05 11:29:35 +0200
commitbbf859b4155b079ba0072570d4bba3bd65d11ae4 (patch)
treebdeedb870039bbdb55e97c1bcfb18992ed742b27 /print-lisp.c
parenteea2b6d5dd579b0fbfa3b4dc3b5a19e18473376e (diff)
downloadtcpdump-bbf859b4155b079ba0072570d4bba3bd65d11ae4.tar.gz
LISP: Fix a Clang warning
The warning was: ./print-lisp.c:401:11: warning: variable 'xtr_present' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if (type == LISP_MAP_NOTIFY) ^~~~~~~~~~~~~~~~~~~~~~~ ./print-lisp.c:404:9: note: uninitialized use occurs here return xtr_present; ^~~~~~~~~~~ Moreover: Remove unused 'interface.h' include.
Diffstat (limited to 'print-lisp.c')
-rw-r--r--print-lisp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/print-lisp.c b/print-lisp.c
index ddddc2e9..6b5b8151 100644
--- a/print-lisp.c
+++ b/print-lisp.c
@@ -107,7 +107,6 @@
#include "ip6.h"
#include "extract.h"
-#include "interface.h"
#include "addrtoname.h"
#define IPv4_AFI 1
@@ -394,7 +393,7 @@ static inline uint8_t extract_lisp_type(uint8_t lisp_hdr_flags)
static inline uint8_t is_xtr_data_present(uint8_t type, uint8_t lisp_hdr_flags)
{
- uint8_t xtr_present;
+ uint8_t xtr_present = 0;
if (type == LISP_MAP_REGISTER)
xtr_present = (lisp_hdr_flags) & LISP_MAP_REGISTER_IBIT_MASK;