From 45dcebc048becfb67f73fd8e5712f7fbeb4769ab Mon Sep 17 00:00:00 2001 From: gardners Date: Fri, 2 Dec 2011 15:19:27 +1030 Subject: [PATCH] Fixed broadcast calculation bug. --- batman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/batman.c b/batman.c index e9a0103b..72c8e120 100644 --- a/batman.c +++ b/batman.c @@ -80,8 +80,8 @@ int readRoutingTable(struct in_addr peers[],int *peer_count,int peer_max){ if (m!=0xFFFFFFFF){ /* Netmask indicates a network, so calculate broadcast address */ - unsigned int d=(d&m)|(0xffffffff^m); - if (debug>1) fprintf(stderr,"Adding broadcast address %08x\n",d); + d=(d&m)|(0xffffffff^m); + if (debug) fprintf(stderr,"Adding broadcast address %08lx\n",d); } if (*peer_count