[batctl] Fix compiler warning in tcpdump.c

Message ID 20090717105727.GA32143@ma.tech.ascom.ch (mailing list archive)
State Accepted, archived
Headers

Commit Message

Andrew Lunn July 17, 2009, 10:57 a.m. UTC
  Compiling batctl/tcpdump.c with gcc version 4.3.3 gives a compiler
warning. Add a cast to fix this.

Signed-off-by: Andrew Lunn <andrew.lunn@ascom.ch>
  

Patch

Index: batctl/tcpdump.c
===================================================================
--- batctl/tcpdump.c	(revision 1347)
+++ batctl/tcpdump.c	(working copy)
@@ -191,7 +191,7 @@ 
 
 		switch (ntohs(udphdr->dest)) {
 		case 67:
-			LEN_CHECK((size_t)buff_len - (iphdr->ihl * 4) - sizeof(struct udphdr), 44, "DHCP");
+                        LEN_CHECK((size_t)buff_len - (iphdr->ihl * 4) - sizeof(struct udphdr), (size_t) 44, "DHCP");
 			printf("%s.67: BOOTP/DHCP, Request from %s, length %zd\n",
 				inet_ntoa(*(struct in_addr *)&iphdr->daddr),
 				ether_ntoa_long((struct ether_addr *)(((char *)udphdr) + sizeof(struct udphdr) + 28)),