summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-11-16 23:34:59 -0800
committerKeith Packard <keithp@keithp.com>2014-01-12 10:14:50 -0800
commitd0339a5c66846c9f14e3b584e34688520a0916ab (patch)
treec55647a2a55a1f2b8059c09bba0bf772e05dd934 /os
parentc608560dbbac18837cb00ef0d774a66ea7706534 (diff)
os: xstrtokenize takes and returns const char * now
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os')
-rw-r--r--os/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/utils.c b/os/utils.c
index 608ee6ab0..e81dc5f2d 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1946,10 +1946,10 @@ CheckUserAuthorization(void)
* Tokenize a string into a NULL terminated array of strings. Always returns
* an allocated array unless an error occurs.
*/
-char **
+const char **
xstrtokenize(const char *str, const char *separators)
{
- char **list, **nlist;
+ const char **list, **nlist;
char *tok, *tmp;
unsigned num = 0, n;
@@ -1977,7 +1977,7 @@ xstrtokenize(const char *str, const char *separators)
error:
free(tmp);
for (n = 0; n < num; n++)
- free(list[n]);
+ free((void *) list[n]);
free(list);
return NULL;
}