Le 29/08/2016 à 15:00, Sergei Shtylyov a écrit :
[snip]
>> if (p == &net->ipv6.devconf_all->forwarding) {
>> + int old_dftl = net->ipv6.devconf_dflt->forwarding;
>> +
>> net->ipv6.devconf_dflt->forwarding = newf;
>> + if ((!newf) ^ (!old_dftl))
>
> IIUC, !'s are not necessary here (and more so the parens around them). And
> perhaps ^ can be changed to != for clarity...
Yes, but a lot of places in this code use that. So for consistency I use the
same.
>
>> + inet6_netconf_notify_devconf(net, NETCONFA_FORWARDING,
>> + NETCONFA_IFINDEX_DEFAULT,
>> + net->ipv6.devconf_dflt);
>> +
>> addrconf_forward_change(net, newf);
>> if ((!newf) ^ (!old))
Here is an example.