repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
overhaul internally-public declarations using wrapper headers
[musl.git]
/
src
/
env
/
clearenv.c
blob
2e275b43457c5c9516701b6b89d999ce186cccd7
1
#define _GNU_SOURCE
2
#include <stdlib.h>
3
#include <unistd.h>
4
#include
"libc.h"
5
6
static void
dummy
(
char
*
old
,
char
*
new
) {}
7
weak_alias
(
dummy
,
__env_rm_add
);
8
9
int
clearenv
()
10
{
11
char
**
e
=
__environ
;
12
__environ
=
0
;
13
if
(
e
)
while
(*
e
)
__env_rm_add
(*
e
++,
0
);
14
return
0
;
15
}