blob: 4eb11d57de39188ebbe492474a9dd3f661503d16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <errno.h>
#include <string.h>
#include <stdlib.h>
int unsetenv(const char *name)
{
if (name == NULL || *name == '\0' || strchr(name, '=')) {
errno = EINVAL;
return -1;
}
return setenv(name, NULL, 1);
}
|