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

Pavel Emelyanov xemul at parallels.com
Wed Nov 7 08:26:22 EST 2012


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.



More information about the CRIU mailing list