dovecot-1.1: Added env_remove().
dovecot at dovecot.org
dovecot at dovecot.org
Sat Dec 13 14:00:07 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/b40079598a1c
changeset: 8041:b40079598a1c
user: Timo Sirainen <tss at iki.fi>
date: Sat Dec 13 13:53:26 2008 +0200
description:
Added env_remove().
diffstat:
2 files changed, 7 insertions(+)
src/lib/env-util.c | 5 +++++
src/lib/env-util.h | 2 ++
diffs (27 lines):
diff -r e8cec6721def -r b40079598a1c src/lib/env-util.c
--- 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
@@ -15,6 +15,11 @@ void env_put(const char *env)
}
if (putenv(p_strdup(pool, env)) != 0)
i_fatal("putenv(%s) failed: %m", env);
+}
+
+void env_remove(const char *name)
+{
+ unsetenv(name);
}
void env_clean(void)
diff -r e8cec6721def -r b40079598a1c src/lib/env-util.h
--- 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);
More information about the dovecot-cvs
mailing list