The logic of fetchnetstat_sysctl() isn't too complex: if idx is 0,

we set and use xtp; if idx is 1, we set and use xip; the other cases
are impossible.  However, GCC cannot see that xip and xtp are always
initialized before use because they are initialized and used in
different if/else blocks.  So setting them to NULL at the very
beginning won't hurt.
This commit is contained in:
Yaroslav Tykhiy 2006-11-27 17:34:40 +00:00
parent 6549e8c62e
commit 599cc46d95
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164680

View File

@ -252,8 +252,8 @@ fetchnetstat_sysctl()
struct xinpgen *inpg;
char *cur, *end;
struct inpcb *inpcb;
struct xinpcb *xip;
struct xtcpcb *xtp;
struct xinpcb *xip = NULL;
struct xtcpcb *xtp = NULL;
int plen;
size_t lsz;