lkml.org 
[lkml]   [2014]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 5/5] Tools: hv: do not add redundant '/' in hv_start_fcopy()
Date


> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
> Sent: Tuesday, December 9, 2014 7:48 AM
> To: KY Srinivasan
> Cc: Haiyang Zhang; devel@linuxdriverproject.org; linux-
> kernel@vger.kernel.org; Dexuan Cui
> Subject: [PATCH 5/5] Tools: hv: do not add redundant '/' in hv_start_fcopy()
>
> We don't need to add additional '/' to smsg->path_name as
> snprintf("%s/%s") does the right thing. Without the patch we get doubled '//'
> in the log message.
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

Thank you.

K. Y
> ---
> tools/hv/hv_fcopy_daemon.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
> index 1a23872..9445d8f 100644
> --- a/tools/hv/hv_fcopy_daemon.c
> +++ b/tools/hv/hv_fcopy_daemon.c
> @@ -43,12 +43,6 @@ static int hv_start_fcopy(struct hv_start_fcopy *smsg)
> int error = HV_E_FAIL;
> char *q, *p;
>
> - /*
> - * If possile append a path seperator to the path.
> - */
> - if (strlen((char *)smsg->path_name) < (W_MAX_PATH - 2))
> - strcat((char *)smsg->path_name, "/");
> -
> p = (char *)smsg->path_name;
> snprintf(target_fname, sizeof(target_fname), "%s/%s",
> (char *)smsg->path_name, (char *)smsg->file_name);
> --
> 1.9.3



\
 
 \ /
  Last update: 2014-12-10 20:21    [W:0.126 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site