dovecot-2.0-sslstream: settings_parser_get_list() returns now NU...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:55:16 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/9cd71f3a6f96
changeset: 10109:9cd71f3a6f96
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Oct 20 18:02:00 2009 -0400
description:
settings_parser_get_list() returns now NULL-terminated list.

diffstat:

2 files changed, 3 insertions(+), 2 deletions(-)
src/lib-settings/settings-parser.c |    2 +-
src/lib-settings/settings-parser.h |    3 ++-

diffs (25 lines):

diff -r dcda7c495eb6 -r 9cd71f3a6f96 src/lib-settings/settings-parser.c
--- a/src/lib-settings/settings-parser.c	Tue Oct 20 17:36:06 2009 -0400
+++ b/src/lib-settings/settings-parser.c	Tue Oct 20 18:02:00 2009 -0400
@@ -165,7 +165,7 @@ void **settings_parser_get_list(struct s
 	unsigned int i;
 	void **sets;
 
-	sets = t_new(void *, ctx->root_count);
+	sets = t_new(void *, ctx->root_count + 1);
 	for (i = 0; i < ctx->root_count; i++)
 		sets[i] = ctx->roots[i].set_struct;
 	return sets;
diff -r dcda7c495eb6 -r 9cd71f3a6f96 src/lib-settings/settings-parser.h
--- a/src/lib-settings/settings-parser.h	Tue Oct 20 17:36:06 2009 -0400
+++ b/src/lib-settings/settings-parser.h	Tue Oct 20 18:02:00 2009 -0400
@@ -94,7 +94,8 @@ void settings_parser_deinit(struct setti
 
 /* Return pointer to root setting structure. */
 void *settings_parser_get(struct setting_parser_context *ctx);
-/* If there are multiple roots, return list to all of their settings. */
+/* If there are multiple roots, return a NULL-terminated list to all of
+   their settings. */
 void **settings_parser_get_list(struct setting_parser_context *ctx);
 /* Like settings_parser_get(), but return change struct. */
 void *settings_parser_get_changes(struct setting_parser_context *ctx);


More information about the dovecot-cvs mailing list