]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix build warning in sock_bindtodevice().
authorDavid S. Miller <davem@davemloft.net>
Fri, 6 Nov 2009 06:37:11 +0000 (22:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Nov 2009 06:37:11 +0000 (22:37 -0800)
commit4a6204dc038a5e0c2174038e07a794f76591747f
tree7fe275574bbaadd808fb38a8f24dc93505a0222b
parent54490a45c11a9fb76047965cdc4c526e12e9bd4f
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: David S. Miller <davem@davemloft.net>
net/core/sock.c