[CRIU] [PATCH] Attempt to restore cgroups
Tycho Andersen
tycho.andersen at canonical.com
Tue Jul 1 14:01:56 PDT 2014
Hi Cyrill,
Thanks for your comments.
On Tue, Jul 01, 2014 at 08:30:13PM +0400, Cyrill Gorcunov wrote:
> strcat really a longtime operation which tossing memory around, maybe
> we can use strchr helper instead, like
>
> for (i = 0; i < strlen(path); i++) {
> char *pos = strchr(&path[i], '/');
> if (!pos)
> break;
> *pos = '\0';
> mkdir(made_path, 0755) < 0 && errno != EEXIST
> i = pos - path + 1;
> }
>
> ? OTOH I can live with strtok as well :)
Ok, I can rewrite this to address both issues :)
Tycho
More information about the CRIU
mailing list