Date: Thu, 15 Nov 2012 19:27:11 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r243097 - stable/9/usr.bin/ktrdump Message-ID: <201211151927.qAFJRBYL043833@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Nov 15 19:27:11 2012 New Revision: 243097 URL: http://svnweb.freebsd.org/changeset/base/243097 Log: MFC r242378: Catch up with r238925. ktr_entries may not be a power of 2. Modified: stable/9/usr.bin/ktrdump/ktrdump.c Directory Properties: stable/9/usr.bin/ktrdump/ (props changed) Modified: stable/9/usr.bin/ktrdump/ktrdump.c ============================================================================== --- stable/9/usr.bin/ktrdump/ktrdump.c Thu Nov 15 19:23:39 2012 (r243096) +++ stable/9/usr.bin/ktrdump/ktrdump.c Thu Nov 15 19:27:11 2012 (r243097) @@ -218,7 +218,7 @@ main(int ac, char **av) * Now tear through the trace buffer. */ if (!iflag) - i = (index - 1) & (entries - 1); + i = (index - 1) % entries; tlast = -1; for (;;) { if (buf[i].ktr_desc == NULL) @@ -286,7 +286,7 @@ next: if ((c = *p++) == '\0') if (!iflag) { if (i == index) break; - i = (i - 1) & (entries - 1); + i = (i - 1) % entries; } else { if (++i == entries) break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211151927.qAFJRBYL043833>