Hugh McMaster : regedit: Use wide character string literals in regedit.c.

Alexandre Julliard julliard at winehq.org
Tue Apr 19 16:20:14 CDT 2022


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

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Thu Apr 14 23:01:37 2022 +1000

regedit: Use wide character string literals in regedit.c.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/regedit/regedit.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c
index d2e27340300..6a50a63226f 100644
--- a/programs/regedit/regedit.c
+++ b/programs/regedit/regedit.c
@@ -107,16 +107,14 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
     switch (action) {
     case ACTION_ADD: {
             WCHAR *filename = argv[*i];
-            WCHAR hyphen[] = {'-',0};
             WCHAR *realname = NULL;
             FILE *reg_file;
 
-            if (!lstrcmpW(filename, hyphen))
+            if (!lstrcmpW(filename, L"-"))
                 reg_file = stdin;
             else
             {
                 int size;
-                WCHAR rb_mode[] = {'r','b',0};
 
                 size = SearchPathW(NULL, filename, NULL, 0, NULL, NULL);
                 if (size > 0)
@@ -130,11 +128,10 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
                     heap_free(realname);
                     return;
                 }
-                reg_file = _wfopen(realname, rb_mode);
+                reg_file = _wfopen(realname, L"rb");
                 if (reg_file == NULL)
                 {
-                    WCHAR regedit[] = {'r','e','g','e','d','i','t',0};
-                    _wperror(regedit);
+                    _wperror(L"regedit");
                     output_message(STRING_CANNOT_OPEN_FILE, filename);
                     heap_free(realname);
                     return;




More information about the wine-cvs mailing list