Bug 84061

Summary: net/batman-adv/gateway_client.c:813: missing sanity check and dodgy coding ?
Product: Networking Reporter: David Binderman (dcb314)
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.17-rc4 Subsystem:
Regression: No Bisected commit-id:

Description David Binderman 2014-09-08 07:04:32 UTC
net/batman-adv/gateway_client.c:813:31: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]

    gw_node = batadv_gw_node_get(bat_priv, orig_dst_node);
    if (!gw_node->bandwidth_down == 0)
        goto out;

Function batadv_gw_node_get can return NULL, so there's
a missing sanity check there and maybe the if condition
can be reworked for clarity.