Skip to content
Commit 000ba2e4 authored by David S. Miller's avatar David S. Miller
Browse files

net: Fix build warning in sock_bindtodevice().



net/core/sock.c: In function 'sock_setsockopt':
net/core/sock.c:396: warning: 'index' may be used uninitialized in this function
net/core/sock.c:396: note: 'index' was declared here

GCC can't see that all paths initialize index, so just
set it to the default (0) and eliminate the specific
code block that handles the null device name string.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent baac8564
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment