summaryrefslogtreecommitdiff
path: root/os/utils.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-01-30 08:52:32 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-02-04 11:27:48 +1000
commit675f215af291135ee3ece5414e4a5a2e89bf4ed3 (patch)
tree065df193a1149a9fbc1d1b4a6bf31083acd409e0 /os/utils.c
parentce3df579e3f24a169189b288230959527e059080 (diff)
Revert "os: xstrtokenize takes and returns const char * now"
This reverts commit d0339a5c66846c9f14e3b584e34688520a0916ab. seriously, what the fuck? Are we making xstrdup() return a const char now too? Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'os/utils.c')
-rw-r--r--os/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/utils.c b/os/utils.c
index dc18a67b1..497779b52 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1973,10 +1973,10 @@ CheckUserAuthorization(void)
* Tokenize a string into a NULL terminated array of strings. Always returns
* an allocated array unless an error occurs.
*/
-const char **
+char **
xstrtokenize(const char *str, const char *separators)
{
- const char **list, **nlist;
+ char **list, **nlist;
char *tok, *tmp;
unsigned num = 0, n;
@@ -2004,7 +2004,7 @@ xstrtokenize(const char *str, const char *separators)
error:
free(tmp);
for (n = 0; n < num; n++)
- free((void *) list[n]);
+ free(list[n]);
free(list);
return NULL;
}