Re: [PATCH 6/6] netfilter: xtables: add const qualifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -static inline int ebt_basic_match(struct ebt_entry *e, struct ethhdr *h,
> -   const struct net_device *in, const struct net_device *out)
> +static inline int
> +ebt_basic_match(const struct ebt_entry *e, const struct ethhdr *h,
> +                const struct net_device *in, const struct net_device *out)

These const modifiers are pointless because compilers are smart enough
to notice non-modifiability and generate the very same code in both cases.

Nowadays, half of functions declarations in generic
xtables/iptables/ip6tables/arptables
code are littered with const which makes them pretty unpleasant to read.

> -	struct ebt_entry *e = (struct ebt_entry *)chain->data;
> +	const struct ebt_entry *e = (struct ebt_entry *)chain->data;

And such things are wrong (not second const).

Please, at least, keep "struct net *" out of this.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux