From dd8ce9fc18f2ce5007883f0fc6885c41deafc1b7 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 9 Sep 2014 14:50:43 +0200 Subject: dissector: Don't re-initialize packet_types array Both sparse and clang warn about the initializers overriding previous initialization of the packet_types array. Since every access of the packet_types array checks the value for NULL (the default value, since the array is static) and prints a "?" if it isNULL, we don't need the prior initialization with "?". Signed-off-by: Tobias Klauser --- dissector.h | 1 - 1 file changed, 1 deletion(-) diff --git a/dissector.h b/dissector.h index 8cb4234..01d1525 100644 --- a/dissector.h +++ b/dissector.h @@ -28,7 +28,6 @@ extern char *if_indextoname(unsigned ifindex, char *ifname); static const char * const packet_types[256] = { - [0 ... 255] = "?", /* Unknown */ [PACKET_HOST] = "<", /* Incoming */ [PACKET_BROADCAST] = "B", /* Broadcast */ [PACKET_MULTICAST] = "M", /* Multicast */ -- cgit v1.2.3-54-g00ecf