Date: Tue, 30 Oct 2012 21:10:07 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242378 - head/usr.bin/ktrdump Message-ID: <201210302110.q9ULA7AS076560@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Tue Oct 30 21:10:06 2012 New Revision: 242378 URL: http://svn.freebsd.org/changeset/base/242378 Log: Catch up with r238925. ktr_entries may not be a power of 2. Modified: head/usr.bin/ktrdump/ktrdump.c Modified: head/usr.bin/ktrdump/ktrdump.c ============================================================================== --- head/usr.bin/ktrdump/ktrdump.c Tue Oct 30 21:05:06 2012 (r242377) +++ head/usr.bin/ktrdump/ktrdump.c Tue Oct 30 21:10:06 2012 (r242378) @@ -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?201210302110.q9ULA7AS076560>