From 4d4c5aa6285aa055a4ec780ba47c180106f0926b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 13 Sep 2011 14:42:10 -0400 Subject: Fix size return for split_on_separator() It was returning the size of the array, rather than the number of elements. (The array was NULL-terminated). This argument was only used in one place that was actually working around this odd return value. --- src/util/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/util.c') diff --git a/src/util/util.c b/src/util/util.c index 649d58ea6..b4b1b1243 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -133,7 +133,7 @@ int split_on_separator(TALLOC_CTX *mem_ctx, const char *str, list[l] = NULL; /* terminate list */ - if (size) *size = l + 1; + if (size) *size = l; *_list = list; return EOK; -- cgit