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 majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to