aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2015-01-10 01:18:55 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 12:17:57 -0500
commitc1136da62170465920eea1ae9ba9ce2234091f77 (patch)
tree48ab14946987fd8517e4d042290699b9aee39e7a /tools
parentaba474b8185d60ca8cdbf3049fe6d655aa761e23 (diff)
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/hv/hv_fcopy_daemon.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
index 1a238726dda6..9445d8f264a4 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)
43 int error = HV_E_FAIL; 43 int error = HV_E_FAIL;
44 char *q, *p; 44 char *q, *p;
45 45
46 /*
47 * If possile append a path seperator to the path.
48 */
49 if (strlen((char *)smsg->path_name) < (W_MAX_PATH - 2))
50 strcat((char *)smsg->path_name, "/");
51
52 p = (char *)smsg->path_name; 46 p = (char *)smsg->path_name;
53 snprintf(target_fname, sizeof(target_fname), "%s/%s", 47 snprintf(target_fname, sizeof(target_fname), "%s/%s",
54 (char *)smsg->path_name, (char *)smsg->file_name); 48 (char *)smsg->path_name, (char *)smsg->file_name);