Quoting Christian Seiler (christ...@iwakd.de):
> Hi Serge,
> 
> Sorry about 'ns' support in my rewrite, I completely forgot that it's
> removal was not so long ago.
> 
> I have a two very minor nit-picky comments:
> 
> > +static char *cgroup_rename_nsgroup(char *mountpath, const char *oldname, 
> > int pid, const char *name)
> > +lxc_cgroup_create(..., int pid)
> 
> pid_t instead of int would be a better idea for pid. Also, mountpath in
> the first function should probably be const to indicate it's contents
> won't be modified.

Agreed, those would be good.

> > +   fulloldpath = alloca(strlen(oldname) + strlen(mountpath) + 22);
> > +   sprintf(fulloldpath, "%s/%s/%d", mountpath, oldname, pid);
> 
> Even though you allocated a correctly-sized buffer, I'd personally
> prefer to always use snprintf to be on the safe side...

Any time I think there's a chance of the underlying variable changing
(i.e. if i'm dereferencing a field from a possibly shared struct) I
so so, but I didn't here.  At some point it always seems like I'm
adversely affecting readability.  But I'll add it back, along with
the other two above fixes, and push that to staging - thanks.

-serge

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to