The following commit has been merged in the next branch: commit 832de22833248409585cf143cfdd16c80b74d04b Author: Antonio Quartulli ordex@autistici.org Date: Sat Apr 28 21:31:13 2012 +0200
batman-adv: remove biggest_unsigned_int() macro
As suggested by David S. Miller, this macro is not very useful. So we can remove it and use its expanded version instead.
Signed-off-by: Antonio Quartulli ordex@autistici.org
diff --git a/distributed-arp-table.h b/distributed-arp-table.h index 5e23577..6c0acde 100644 --- a/distributed-arp-table.h +++ b/distributed-arp-table.h @@ -29,7 +29,7 @@
#include <linux/if_arp.h>
-#define DAT_ADDR_MAX biggest_unsigned_int(dat_addr_t) +#define DAT_ADDR_MAX ((dat_addr_t)~(dat_addr_t)0)
#define ARP_HW_SRC(skb, hdr_size) ((uint8_t *)(skb->data + hdr_size) + \ ETH_HLEN + sizeof(struct arphdr)) diff --git a/main.h b/main.h index 97d0258..426a0d5 100644 --- a/main.h +++ b/main.h @@ -241,9 +241,6 @@ static inline bool has_timed_out(unsigned long timestamp, unsigned int timeout) /* Returns the smallest signed integer in two's complement with the sizeof x */ #define smallest_signed_int(x) (1u << (7u + 8u * (sizeof(x) - 1u)))
-/* Returns the biggest unsigned integer with the sizeof x */ -#define biggest_unsigned_int(x) (~(x)0) - /* Checks if a sequence number x is a predecessor/successor of y. * they handle overflows/underflows and can correctly check for a * predecessor/successor unless the variable sequence number has grown by