Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Apr 2002 04:04:32 -0700
From:      Maxime Henrion <mux@freebsd.org>
To:        current@FreeBSD.org
Subject:   Re: Recent commit to sys/kern/kern_environment.c broke reading tunables
Message-ID:  <20020427110432.GA63621@elvis.mu.org>

next in thread | raw e-mail | index | archive | help

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

	Hi,


I think I may have found the bug.  Could someone test the attached patch
and report if it fixes the problem or not ?

Thanks in advance,
Maxime

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="hints.diff"

Index: subr_hints.c
===================================================================
RCS file: /space2/ncvs/src/sys/kern/subr_hints.c,v
retrieving revision 1.4
diff -u -p -r1.4 subr_hints.c
--- subr_hints.c	17 Apr 2002 13:06:36 -0000	1.4
+++ subr_hints.c	27 Apr 2002 10:42:04 -0000
@@ -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;

--a8Wt8u1KmwUX3Y2C--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020427110432.GA63621>