From: Vitaly Kuznetsov Date: Sat, 10 Jan 2015 06:18:55 +0000 (-0800) Subject: Tools: hv: do not add redundant '/' in hv_start_fcopy() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c1136da62170465920eea1ae9ba9ce2234091f77;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- 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) 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);