MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _getenv_static_from

Function _getenv_static_from

freebsd/kern/kern_environment.c:441–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441static char *
442_getenv_static_from(char *chkenv, const char *name)
443{
444 char *cp, *ep;
445 int len;
446
447 for (cp = chkenv; cp != NULL; cp = kernenv_next(cp)) {
448 for (ep = cp; (*ep != '=') && (*ep != 0); ep++)
449 ;
450 if (*ep != '=')
451 continue;
452 len = ep - cp;
453 ep++;
454 if (!strncmp(name, cp, len) && name[len] == 0)
455 return (ep);
456 }
457 return (NULL);
458}
459
460static char *
461_getenv_static(const char *name)

Callers 1

_getenv_staticFunction · 0.70

Calls 2

strncmpFunction · 0.85
kernenv_nextFunction · 0.70

Tested by

no test coverage detected