mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Catch up with r238925. ktr_entries may not be a power of 2.
This commit is contained in:
parent
e61e6189e5
commit
913f53dc29
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242378
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue