To avoid duplicated warning, move WITNESS_WARN() added in r221597 to the
branch which doesn't call malloc(9). Suggested by: kib
This commit is contained in:
parent
a63f3da5b2
commit
852bee75b7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221607
@ -310,7 +310,6 @@ getenv(const char *name)
|
|||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (dynamic_kenv) {
|
if (dynamic_kenv) {
|
||||||
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv");
|
|
||||||
mtx_lock(&kenv_lock);
|
mtx_lock(&kenv_lock);
|
||||||
cp = _getenv_dynamic(name, NULL);
|
cp = _getenv_dynamic(name, NULL);
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
@ -322,6 +321,8 @@ getenv(const char *name)
|
|||||||
} else {
|
} else {
|
||||||
mtx_unlock(&kenv_lock);
|
mtx_unlock(&kenv_lock);
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
|
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
|
||||||
|
"getenv");
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
ret = _getenv_static(name);
|
ret = _getenv_static(name);
|
||||||
|
Loading…
Reference in New Issue
Block a user