Michael Stefaniuc : xcopy: Avoid an empty if-block.

Alexandre Julliard julliard at winehq.org
Wed Oct 21 15:15:13 CDT 2020


Module: wine
Branch: master
Commit: 7bbd46ba3f12d2acadd4cfef882642d97381898d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7bbd46ba3f12d2acadd4cfef882642d97381898d

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Wed Oct 21 01:02:39 2020 +0200

xcopy: Avoid an empty if-block.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/xcopy/xcopy.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c
index 7c1bc1f472d..c2427f355aa 100644
--- a/programs/xcopy/xcopy.c
+++ b/programs/xcopy/xcopy.c
@@ -526,16 +526,11 @@ static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec,
 
             /* Output a status message */
             if (!skipFile) {
-                if (flags & OPT_QUIET) {
-                    /* Skip message */
-                } else if (flags & OPT_FULL) {
-                    const WCHAR infostr[]   = {'%', '1', ' ', '-', '>', ' ',
-                                               '%', '2', '\n', 0};
-
-                    XCOPY_wprintf(infostr, copyFrom, copyTo);
-                } else {
-                    const WCHAR infostr[] = {'%', '1', '\n', 0};
-                    XCOPY_wprintf(infostr, copyFrom);
+                if (!(flags & OPT_QUIET)) {
+                    if (flags & OPT_FULL)
+                        XCOPY_wprintf(L"%1 -> %2\n", copyFrom, copyTo);
+                    else
+                        XCOPY_wprintf(L"%1\n", copyFrom);
                 }
 
                 /* If allowing overwriting of read only files, remove any




More information about the wine-cvs mailing list