[09/10] batctl: tcpdump: Fix types for for TT v1

Message ID 20171123140444.17119-10-sven.eckelmann@openmesh.com (mailing list archive)
State Accepted, archived
Commit 15a1335cadacc7c3bb4723a30617d123a961a311
Delegated to: Simon Wunderlich
Headers
Series batctl: Fixes and minor cleanup |

Commit Message

Sven Eckelmann Nov. 23, 2017, 2:04 p.m. UTC
  The num_entry and num_vlan variables are accessed (printed) as u16
variables and not like integers. They should therefore also be stored like
that.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
---
 tcpdump.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/tcpdump.c b/tcpdump.c
index 5eb99cf..a1b057b 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -158,7 +158,8 @@  static void batctl_tvlv_parse_tt_v1(void *buff, ssize_t buff_len)
 {
 	struct batadv_tvlv_tt_data *tvlv = buff;
 	struct batadv_tvlv_tt_vlan_data *vlan;
-	int i, num_vlan, num_entry;
+	int i;
+	unsigned short num_vlan, num_entry;
 	const char *type;
 	size_t vlan_len;