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

Function testenv

freebsd/kern/kern_environment.c:507–518  ·  view source on GitHub ↗

* Test if an environment variable is defined. */

Source from the content-addressed store, hash-verified

505 * Test if an environment variable is defined.
506 */
507int
508testenv(const char *name)
509{
510 char *cp;
511
512 cp = kenv_acquire(name);
513 kenv_release(cp);
514
515 if (cp != NULL)
516 return (1);
517 return (0);
518}
519
520/*
521 * Set an environment variable in the MD-static environment. This cannot

Callers 1

static_hints_to_envFunction · 0.70

Calls 2

kenv_acquireFunction · 0.70
kenv_releaseFunction · 0.70

Tested by

no test coverage detected