Bug 84061 - net/batman-adv/gateway_client.c:813: missing sanity check and dodgy coding ?
Summary: net/batman-adv/gateway_client.c:813: missing sanity check and dodgy coding ?
Status: NEW
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-08 07:04 UTC by David Binderman
Modified: 2014-09-08 07:04 UTC (History)
0 users

See Also:
Kernel Version: 3.17-rc4
Tree: Mainline
Regression: No


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.