[CRIU] [PATCH] net: remove excess null terminating characters in messages

Andrew Vagin avagin at virtuozzo.com
Fri Aug 17 00:16:48 MSK 2018


Applied, thanks

On Thu, Aug 09, 2018 at 10:50:53AM +0300, Pavel Tikhomirov wrote:
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> ---
>  criu/net.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/criu/net.c b/criu/net.c
> index cbd03dd0a..b87b3b33a 100644
> --- a/criu/net.c
> +++ b/criu/net.c
> @@ -1717,7 +1717,7 @@ static int run_ip_tool(char *arg1, char *arg2, char *arg3, char *arg4, int fdin,
>  	char *ip_tool_cmd;
>  	int ret;
>  
> -	pr_debug("\tRunning ip %s %s %s %s\n", arg1, arg2, arg3 ? : "\0", arg4 ? : "\0");
> +	pr_debug("\tRunning ip %s %s %s %s\n", arg1, arg2, arg3 ? : "", arg4 ? : "");
>  
>  	ip_tool_cmd = getenv("CR_IP_TOOL");
>  	if (!ip_tool_cmd)
> @@ -1727,7 +1727,7 @@ static int run_ip_tool(char *arg1, char *arg2, char *arg3, char *arg4, int fdin,
>  				(char *[]) { "ip", arg1, arg2, arg3, arg4, NULL }, flags);
>  	if (ret) {
>  		if (!(flags & CRS_CAN_FAIL))
> -			pr_err("IP tool failed on %s %s %s %s\n", arg1, arg2, arg3 ? : "\0", arg4 ? : "\0");
> +			pr_err("IP tool failed on %s %s %s %s\n", arg1, arg2, arg3 ? : "", arg4 ? : "");
>  		return -1;
>  	}
>  
> -- 
> 2.17.1
> 


More information about the CRIU mailing list