1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

Fix a loop condition

The correct way to identify the end of the metadata is two adjacent
entries set to zero/MODINFO_END. I made a typo and this was checking the
first entry twice.

Reported by:	rpokala
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
This commit is contained in:
Mitchell Horne 2020-10-08 18:29:17 +00:00
parent 22e6a67086
commit 841dad02e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366543

View File

@ -496,7 +496,7 @@ preload_dump_internal(struct sbuf *sbp)
*/
bptr = (uint32_t *)preload_metadata;
sbuf_putc(sbp, '\n');
while (bptr[0] != MODINFO_END || bptr[0] != MODINFO_END) {
while (bptr[0] != MODINFO_END || bptr[1] != MODINFO_END) {
sbuf_printf(sbp, " %p:\n", bptr);
type = *bptr++;
len = *bptr++;