Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8536:b1a7df02ba38 HEAD
Added env_remove().
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 13 Dec 2008 13:53:26 +0200 |
parents | 403621c075c5 |
children | 1e913c30c1ed |
files | src/lib/env-util.c src/lib/env-util.h |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/env-util.c Sat Dec 13 13:19:03 2008 +0200 +++ b/src/lib/env-util.c Sat Dec 13 13:53:26 2008 +0200 @@ -17,6 +17,11 @@ i_fatal("putenv(%s) failed: %m", env); } +void env_remove(const char *name) +{ + unsetenv(name); +} + void env_clean(void) { #ifdef HAVE_CLEARENV
--- a/src/lib/env-util.h Sat Dec 13 13:19:03 2008 +0200 +++ b/src/lib/env-util.h Sat Dec 13 13:53:26 2008 +0200 @@ -4,6 +4,8 @@ /* Add new environment variable. Wrapper to putenv(). Note that calls to this function allocates memory which isn't free'd until env_clean() is called. */ void env_put(const char *env); +/* Remove a single environment. */ +void env_remove(const char *name); /* Clear all environment variables. */ void env_clean(void);