From: Christian Brauner Date: Thu, 26 Jul 2018 14:09:31 +0000 (+0200) Subject: lxccontainer: s/strtok_r()/lxc_iterate_parts()/g X-Git-Tag: lxc-3.1.0~191^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c1f04cdfa93f7d5f5af6368f01bf6c26230d248;p=thirdparty%2Flxc.git lxccontainer: s/strtok_r()/lxc_iterate_parts()/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index f1829cf8d..c5b515f60 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -759,7 +759,6 @@ static char **split_init_cmd(const char *incmd) char *copy, *p; char **argv; int nargs = 0; - char *saveptr = NULL; if (!incmd) return NULL; @@ -775,7 +774,7 @@ static char **split_init_cmd(const char *incmd) } while (!argv); argv[0] = NULL; - for (; (p = strtok_r(copy, " ", &saveptr)); copy = NULL) + lxc_iterate_parts(p, copy, " ") push_arg(&argv, p, &nargs); if (nargs == 0) {