summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-01-17 14:35:37 +0000
committertuexen <tuexen@FreeBSD.org>2016-01-17 14:35:37 +0000
commit8dc6b513619b1938f1f01524239602aac392ff09 (patch)
treef4208e7915339b20ca3ecda7d65ee13c98a73364 /usr.bin
parent384a4d33ff97e6f2bc574de395edc39627cf5cdf (diff)
downloadFreeBSD-src-8dc6b513619b1938f1f01524239602aac392ff09.zip
FreeBSD-src-8dc6b513619b1938f1f01524239602aac392ff09.tar.gz
MFC r285651:
Move assignments around to avoid a false-positive uninitialized variable warning which broke the sparc64 build. This is work from des@ and MFCing was discussed with him.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sockstat/sockstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c
index 3c089b0..454bc3d 100644
--- a/usr.bin/sockstat/sockstat.c
+++ b/usr.bin/sockstat/sockstat.c
@@ -598,9 +598,10 @@ gather_inet(int proto)
xig = (struct xinpgen *)(void *)((char *)xig + xig->xig_len);
if (xig >= exig)
break;
+ xip = (struct xinpcb *)xig;
+ xtp = (struct xtcpcb *)xig;
switch (proto) {
case IPPROTO_TCP:
- xtp = (struct xtcpcb *)xig;
if (xtp->xt_len != sizeof(*xtp)) {
warnx("struct xtcpcb size mismatch");
goto out;
@@ -612,7 +613,6 @@ gather_inet(int proto)
break;
case IPPROTO_UDP:
case IPPROTO_DIVERT:
- xip = (struct xinpcb *)xig;
if (xip->xi_len != sizeof(*xip)) {
warnx("struct xinpcb size mismatch");
goto out;
OpenPOWER on IntegriCloud