Date: Wed, 27 Jan 1999 13:23:51 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: current@FreeBSD.ORG Subject: Doh: kern/kern_environment, getenv() Message-ID: <199901272123.NAA55283@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
Boy, aren't we lucky that every kern_envp entry has an '='
sign! This turns into a NOP most of the time.
Fixed.
-Matt
char *
getenv(char *name)
{
char *cp, *ep;
int len;
for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) {
for (ep = cp; (*ep != '=') && (*ep != 0); ep++)
;
len = ep - cp;
if (*ep = '=') <<<<<<<<<<<<<<<<<<<<<<< single '='
ep++;
if (!strncmp(name, cp, len))
return(ep);
}
return(NULL);
}
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?199901272123.NAA55283>
