Fix uninitialized variable
authorJoe Korty <joe.korty@ccur.com>
Wed, 25 May 2016 13:09:41 +0000 (18:09 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sun, 17 Jul 2016 21:00:12 +0000 (14:00 -0700)
commit7d77d0ecac9ef18c29bb481848c69fc127531761
tree8ed1c274f730e8fa6da0f51d17e076fe3e3fb1a5
parentc9c6018dda4a7dff92898a0cb918c932fb4b8ea4
Fix uninitialized variable

Quiet gcc warning by giving 'in6' an initial
value of NULL.

Technically this is wrong, but there seems to
be no path through the function where 'in6' is
not set then used.  If that is wrong, we will
get a NULL pointer kernel panic.  Though bad,
that is better then the current situation,
where some random spot in the kernel gets
modified via the following of an undefined
pointer value in 'in6'.

include/net/ipv6.h:417:34: warning:
'in6' may be used uninitialized in this function
[-Wmaybe-uninitialized]
return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL;

net/ipv4/tcp.c:3513:19: note: 'in6' was declared here
struct in6_addr *in6;

Bug 200187768

Change-Id: I4db7b351ae720c0a34c48ea7f39e95b788164900
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163944
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
net/ipv4/tcp.c