diff options
author | julian <julian@FreeBSD.org> | 1999-10-21 07:08:56 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-10-21 07:08:56 +0000 |
commit | 698af92f8613624eb9b69ed626a553ef9ed11bc3 (patch) | |
tree | 34f8c1411b594ef1f2403820c4a879e1fe6bf163 /usr.bin/netstat/if.c | |
parent | 15e239d7e5b385cfdafaca3aebfbcbc63892abdc (diff) | |
download | FreeBSD-src-698af92f8613624eb9b69ed626a553ef9ed11bc3.zip FreeBSD-src-698af92f8613624eb9b69ed626a553ef9ed11bc3.tar.gz |
Cleanup towards -Wall
Diffstat (limited to 'usr.bin/netstat/if.c')
-rw-r--r-- | usr.bin/netstat/if.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 61ad2b6..32a8eaa 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -135,7 +135,7 @@ intpr(interval, ifnetaddr) u_long ifaddraddr; u_long ifaddrfound; u_long ifnetfound; - struct sockaddr *sa; + struct sockaddr *sa = NULL; char name[32], tname[16]; if (ifnetaddr == 0) { @@ -199,7 +199,8 @@ intpr(interval, ifnetaddr) } #define CP(x) ((char *)(x)) cp = (CP(ifaddr.ifa.ifa_addr) - CP(ifaddraddr)) + - CP(&ifaddr); sa = (struct sockaddr *)cp; + CP(&ifaddr); + sa = (struct sockaddr *)cp; switch (sa->sa_family) { case AF_UNSPEC: printf("%-13.13s ", "none"); |