Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e79ec50b authored by Jan Engelhardt's avatar Jan Engelhardt Committed by David S. Miller
Browse files

[NETFILTER]: Parenthesize macro parameters



Parenthesize macro parameters.

Signed-off-by: default avatarJan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 643a2c15
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -84,7 +84,7 @@ static inline int arp_packet_match(const struct arphdr *arphdr,
	__be32 src_ipaddr, tgt_ipaddr;
	__be32 src_ipaddr, tgt_ipaddr;
	int i, ret;
	int i, ret;


#define FWINV(bool,invflg) ((bool) ^ !!(arpinfo->invflags & invflg))
#define FWINV(bool, invflg) ((bool) ^ !!(arpinfo->invflags & (invflg)))


	if (FWINV((arphdr->ar_op & arpinfo->arpop_mask) != arpinfo->arpop,
	if (FWINV((arphdr->ar_op & arpinfo->arpop_mask) != arpinfo->arpop,
		  ARPT_INV_ARPOP)) {
		  ARPT_INV_ARPOP)) {
@@ -180,6 +180,7 @@ static inline int arp_packet_match(const struct arphdr *arphdr,
	}
	}


	return 1;
	return 1;
#undef FWINV
}
}


static inline int arp_checkentry(const struct arpt_arp *arp)
static inline int arp_checkentry(const struct arpt_arp *arp)
+2 −1
Original line number Original line Diff line number Diff line
@@ -85,7 +85,7 @@ ip_packet_match(const struct iphdr *ip,
	size_t i;
	size_t i;
	unsigned long ret;
	unsigned long ret;


#define FWINV(bool,invflg) ((bool) ^ !!(ipinfo->invflags & invflg))
#define FWINV(bool, invflg) ((bool) ^ !!(ipinfo->invflags & (invflg)))


	if (FWINV((ip->saddr&ipinfo->smsk.s_addr) != ipinfo->src.s_addr,
	if (FWINV((ip->saddr&ipinfo->smsk.s_addr) != ipinfo->src.s_addr,
		  IPT_INV_SRCIP)
		  IPT_INV_SRCIP)
@@ -216,6 +216,7 @@ unconditional(const struct ipt_ip *ip)
			return 0;
			return 0;


	return 1;
	return 1;
#undef FWINV
}
}


#if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \
#if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \
+1 −1
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ MODULE_ALIAS("ip_nat_snmp_basic");


#define SNMP_PORT 161
#define SNMP_PORT 161
#define SNMP_TRAP_PORT 162
#define SNMP_TRAP_PORT 162
#define NOCT1(n) (*(u8 *)n)
#define NOCT1(n) (*(u8 *)(n))


static int debug;
static int debug;
static DEFINE_SPINLOCK(snmp_lock);
static DEFINE_SPINLOCK(snmp_lock);
+1 −1
Original line number Original line Diff line number Diff line
@@ -102,7 +102,7 @@ ip6_packet_match(const struct sk_buff *skb,
	unsigned long ret;
	unsigned long ret;
	const struct ipv6hdr *ipv6 = ipv6_hdr(skb);
	const struct ipv6hdr *ipv6 = ipv6_hdr(skb);


#define FWINV(bool,invflg) ((bool) ^ !!(ip6info->invflags & invflg))
#define FWINV(bool, invflg) ((bool) ^ !!(ip6info->invflags & (invflg)))


	if (FWINV(ipv6_masked_addr_cmp(&ipv6->saddr, &ip6info->smsk,
	if (FWINV(ipv6_masked_addr_cmp(&ipv6->saddr, &ip6info->smsk,
				       &ip6info->src), IP6T_INV_SRCIP)
				       &ip6info->src), IP6T_INV_SRCIP)
+4 −4
Original line number Original line Diff line number Diff line
@@ -100,10 +100,10 @@ typedef struct {
} bitstr_t;
} bitstr_t;


/* Tool Functions */
/* Tool Functions */
#define INC_BIT(bs) if((++bs->bit)>7){bs->cur++;bs->bit=0;}
#define INC_BIT(bs) if((++(bs)->bit)>7){(bs)->cur++;(bs)->bit=0;}
#define INC_BITS(bs,b) if((bs->bit+=b)>7){bs->cur+=bs->bit>>3;bs->bit&=7;}
#define INC_BITS(bs,b) if(((bs)->bit+=(b))>7){(bs)->cur+=(bs)->bit>>3;(bs)->bit&=7;}
#define BYTE_ALIGN(bs) if(bs->bit){bs->cur++;bs->bit=0;}
#define BYTE_ALIGN(bs) if((bs)->bit){(bs)->cur++;(bs)->bit=0;}
#define CHECK_BOUND(bs,n) if(bs->cur+(n)>bs->end)return(H323_ERROR_BOUND)
#define CHECK_BOUND(bs,n) if((bs)->cur+(n)>(bs)->end)return(H323_ERROR_BOUND)
static unsigned get_len(bitstr_t * bs);
static unsigned get_len(bitstr_t * bs);
static unsigned get_bit(bitstr_t * bs);
static unsigned get_bit(bitstr_t * bs);
static unsigned get_bits(bitstr_t * bs, unsigned b);
static unsigned get_bits(bitstr_t * bs, unsigned b);
Loading