diff options
Diffstat (limited to 'net/batman-adv/bitarray.h')
| -rw-r--r-- | net/batman-adv/bitarray.h | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/bitarray.h b/net/batman-adv/bitarray.h index a081ce1c051..cebaae7e148 100644 --- a/net/batman-adv/bitarray.h +++ b/net/batman-adv/bitarray.h @@ -20,8 +20,8 @@  #ifndef _NET_BATMAN_ADV_BITARRAY_H_  #define _NET_BATMAN_ADV_BITARRAY_H_ -/* returns true if the corresponding bit in the given seq_bits indicates true - * and curr_seqno is within range of last_seqno +/* Returns 1 if the corresponding bit in the given seq_bits indicates true + * and curr_seqno is within range of last_seqno. Otherwise returns 0.   */  static inline int batadv_test_bit(const unsigned long *seq_bits,  				  uint32_t last_seqno, uint32_t curr_seqno) @@ -32,7 +32,7 @@ static inline int batadv_test_bit(const unsigned long *seq_bits,  	if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE)  		return 0;  	else -		return  test_bit(diff, seq_bits); +		return test_bit(diff, seq_bits) != 0;  }  /* turn corresponding bit on, so we can remember that we got the packet */  |