mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
staging/lustre/lnet: Fix potential uninitialized variable warning
Greg reports that with one of the patches in his queue there's now an unused variable warning in lnet_parse_ip2nets for ipaddrs variable. Apparently the warning is a false positive as in all cases where lnet_ipaddr_enumerate can return without setting ipaddrs to something a negative return value is returned that is then checked before we actually use ipaddrs. Assign ipaddrs to NULL to quiet this. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab909585b8
commit
459d3236ad
|
|
@ -1172,7 +1172,7 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp)
|
|||
int
|
||||
lnet_parse_ip2nets(char **networksp, char *ip2nets)
|
||||
{
|
||||
__u32 *ipaddrs;
|
||||
__u32 *ipaddrs = NULL;
|
||||
int nip = lnet_ipaddr_enumerate(&ipaddrs);
|
||||
int rc;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user