Date: Sun, 17 Jan 2016 14:35:37 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294226 - stable/10/usr.bin/sockstat Message-ID: <201601171435.u0HEZbtU048661@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Sun Jan 17 14:35:37 2016 New Revision: 294226 URL: https://svnweb.freebsd.org/changeset/base/294226 Log: 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. Modified: stable/10/usr.bin/sockstat/sockstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sockstat/sockstat.c ============================================================================== --- stable/10/usr.bin/sockstat/sockstat.c Sun Jan 17 14:33:40 2016 (r294225) +++ stable/10/usr.bin/sockstat/sockstat.c Sun Jan 17 14:35:37 2016 (r294226) @@ -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?201601171435.u0HEZbtU048661>