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

Function _getenv_dynamic_locked

freebsd/kern/kern_environment.c:415–431  ·  view source on GitHub ↗

* Internal functions for string lookup. */

Source from the content-addressed store, hash-verified

413 * Internal functions for string lookup.
414 */
415static char *
416_getenv_dynamic_locked(const char *name, int *idx)
417{
418 char *cp;
419 int len, i;
420
421 len = strlen(name);
422 for (cp = kenvp[0], i = 0; cp != NULL; cp = kenvp[++i]) {
423 if ((strncmp(cp, name, len) == 0) &&
424 (cp[len] == '=')) {
425 if (idx != NULL)
426 *idx = i;
427 return (cp + len + 1);
428 }
429 }
430 return (NULL);
431}
432
433static char *
434_getenv_dynamic(const char *name, int *idx)

Callers 2

init_dynamic_kenv_fromFunction · 0.70
_getenv_dynamicFunction · 0.70

Calls 1

strncmpFunction · 0.85

Tested by

no test coverage detected