diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c index ddcba4a6c0f..27845644d19 100644 --- a/sys/kern/subr_hints.c +++ b/sys/kern/subr_hints.c @@ -150,9 +150,11 @@ res_find(int *line, int *startln, break; if (use_kenv) cp = kenvp[++i]; - while (*cp != '\0') + else { + while (*cp != '\0') + cp++; cp++; - cp++; + } if (*cp == '\0') { cp = NULL; break;