[CRIU] [PATCH 03/13] parasite: Add [init|fini]_thread helpers

Cyrill Gorcunov gorcunov at openvz.org
Wed Nov 7 08:31:00 EST 2012


On Wed, Nov 07, 2012 at 05:26:22PM +0400, Pavel Emelyanov wrote:
> On 11/07/2012 02:25 PM, Cyrill Gorcunov wrote:
> > On Wed, Nov 07, 2012 at 02:21:46PM +0400, Cyrill Gorcunov wrote:
> >>>> +static int fini_thread(struct parasite_thread_args *args)
> >>>> +{
> >>>> +	struct tid_state_s *s = find_thread_state(args->tid);
> >>>
> >>> Don't initialize variable during declaration with the result of
> >>> any call.
> >>
> >> Well... ok, i'll update.
> > 
> > Btw, you don't like var init as func call in general? 
> > Because I wonder since it works pretty well in kernel code and for some
> > sake it doesn't for us?
> 
> It works OK, just I consider this to be bad practice and would like
> to avoid this in criu as much as possible.

OK, i see.


More information about the CRIU mailing list