dovecot-2.1: env_clean(): Previous OSX compile fix broke the fun...

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 19 22:29:41 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/9d022d3fba42
changeset: 13732:9d022d3fba42
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 19 22:29:31 2011 +0200
description:
env_clean(): Previous OSX compile fix broke the function completely.

diffstat:

 src/lib/env-util.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r b2c9298e981a -r 9d022d3fba42 src/lib/env-util.c
--- a/src/lib/env-util.c	Sat Nov 19 21:48:14 2011 +0200
+++ b/src/lib/env-util.c	Sat Nov 19 22:29:31 2011 +0200
@@ -59,7 +59,7 @@
 	if (clearenv() < 0)
 		i_fatal("clearenv() failed");
 #else
-	char **environ = *env_get_environ_p();
+	char ***environ_p = env_get_environ_p();
 
 	/* Try to clear the environment.
 
@@ -68,7 +68,7 @@
 	   c) environ = emptyenv doesn't work on Haiku OS
 	   d) environ = calloc() should work everywhere
 	*/
-	environ = calloc(1, sizeof(*environ));
+	*environ_p = calloc(1, sizeof(**environ_p));
 #endif
 	if (env_pool != NULL)
 		p_clear(env_pool);


More information about the dovecot-cvs mailing list