[CRIU] [PATCH 4/8] parasite: Add missing 'void' in function declarations

Stanislav Kinsbursky skinsbursky at parallels.com
Wed Feb 22 04:20:55 EST 2012


22.02.2012 00:22, Cyrill Gorcunov пишет:
> Signed-off-by: Cyrill Gorcunov<gorcunov at openvz.org>
> ---
>   parasite.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/parasite.c b/parasite.c
> index 544376f..50fcbf7 100644
> --- a/parasite.c
> +++ b/parasite.c
> @@ -401,13 +401,13 @@ static int init(struct parasite_init_args *args)
>   	return ret;
>   }
>
> -static int set_logfd()
> +static int set_logfd(void)
>   {
>   	logfd = recv_fd(tsock);
>   	return logfd;
>   }
>
> -static int fini()
> +static int fini(void)
>   {
>   	if (reset_blocked == 1)
>   		sys_sigprocmask(SIG_SETMASK,&old_blocked, NULL);

I have some other cleanup solution. Consider it, please:
1) Pass args pointer to every to command handler function (even if it's not used 
inside). BTW, explicit type cast for void pointers is redundant.
2) Call SET_PARASITE_STATUS_SUCCESS(st) only (!) in parasite_service() in case 
of command success. Thus collect of command handler function result is required.

-- 
Best regards,
Stanislav Kinsbursky



More information about the CRIU mailing list