Date: Fri, 17 Jul 2015 08:37:14 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285651 - head/usr.bin/sockstat Message-ID: <201507170837.t6H8bErf076103@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Fri Jul 17 08:37:13 2015 New Revision: 285651 URL: https://svnweb.freebsd.org/changeset/base/285651 Log: Move assignments around to avoid a false-positive uninitialized variable warning which broke the sparc64 build. PR: 201585 MFC after: 3 weeks Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Fri Jul 17 08:06:40 2015 (r285650) +++ head/usr.bin/sockstat/sockstat.c Fri Jul 17 08:37:13 2015 (r285651) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507170837.t6H8bErf076103>