summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-09-13 14:42:10 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-11-02 11:12:11 -0400
commit4d4c5aa6285aa055a4ec780ba47c180106f0926b (patch)
treeb7831744863600e06a2cb0fc5a00b4b175db9e1c /src/util
parentbbb878fd1bfb49120a0b4fee25eb1ec4de7365e1 (diff)
downloadsssd_unused-4d4c5aa6285aa055a4ec780ba47c180106f0926b.tar.gz
sssd_unused-4d4c5aa6285aa055a4ec780ba47c180106f0926b.tar.xz
sssd_unused-4d4c5aa6285aa055a4ec780ba47c180106f0926b.zip
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.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/util.c b/src/util/util.c
index 649d58ea..b4b1b124 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;