diff options
author | David Howells <dhowells@redhat.com> | 2011-06-15 09:41:36 +0200 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-06-20 11:23:36 +0200 |
commit | b2c44a53836559b5e2823aa215c979c33bc9e2db (patch) | |
tree | 4373f6917c6c28b9caab3050e74571afc69bcbde /net/batman-adv/routing.c | |
parent | db69ecfcb0d4df4d6449172186a8dd20836275ed (diff) |
batman-adv: count_real_packets() in batman-adv assumes char is signed
count_real_packets() in batman-adv assumes char is signed, and returns -1
through it:
net/batman-adv/routing.c: In function 'receive_bat_packet':
net/batman-adv/routing.c:739: warning: comparison is always false due to limited range of data type
Use int instead.
Signed-off-by: David Howells <dhowells@redhat.com>
[sven@narfation.org: Rebase on top of current version]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r-- | net/batman-adv/routing.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 934f1f2f86c..d5ce644f872 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -361,7 +361,7 @@ static void update_orig(struct bat_priv *bat_priv, struct orig_node *orig_node, const struct batman_packet *batman_packet, struct hard_iface *if_incoming, const unsigned char *tt_buff, int tt_buff_len, - char is_duplicate) + int is_duplicate) { struct neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL; struct neigh_node *router = NULL; @@ -528,7 +528,7 @@ static int window_protected(struct bat_priv *bat_priv, * -1 the packet is old and has been received while the seqno window * was protected. Caller should drop it. */ -static char count_real_packets(const struct ethhdr *ethhdr, +static int count_real_packets(const struct ethhdr *ethhdr, const struct batman_packet *batman_packet, const struct hard_iface *if_incoming) { @@ -536,7 +536,7 @@ static char count_real_packets(const struct ethhdr *ethhdr, struct orig_node *orig_node; struct neigh_node *tmp_neigh_node; struct hlist_node *node; - char is_duplicate = 0; + int is_duplicate = 0; int32_t seq_diff; int need_update = 0; int set_mark, ret = -1; @@ -605,7 +605,7 @@ void receive_bat_packet(const struct ethhdr *ethhdr, char has_directlink_flag; char is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0; char is_broadcast = 0, is_bidirectional, is_single_hop_neigh; - char is_duplicate; + int is_duplicate; uint32_t if_incoming_seqno; /* Silently drop when the batman packet is actually not a |