Alexander Nicolaysen Sørnes : regedit: Use strchrW instead of custom code in Unicode file import.

Alexandre Julliard julliard at winehq.org
Fri Jul 11 08:44:16 CDT 2008


Module: wine
Branch: master
Commit: e83d8dad0459abdddf6ff32c11ea39a4c83ed543
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e83d8dad0459abdddf6ff32c11ea39a4c83ed543

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Fri Jul 11 02:54:04 2008 +0200

regedit: Use strchrW instead of custom code in Unicode file import.

---

 programs/regedit/regproc.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index 2f8b826..4721bf3 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -707,7 +707,6 @@ void processRegLinesW(FILE *in)
     size_t check = -1;
 
     WCHAR* s; /* The pointer into line for where the current fgets should read */
-    int i;
 
     buf = HeapAlloc(GetProcessHeap(), 0, lineSize * sizeof(WCHAR));
     CHECK_ENOUGH_MEMORY(buf);
@@ -761,14 +760,7 @@ void processRegLinesW(FILE *in)
         /* If we didn't read the eol nor the eof go around for the rest */
         while(1)
         {
-            for(i = 0; s[i] != 0; i++)
-            {
-                if(s[i] == '\n')
-                {
-                    s_eol = &s[i];
-                    break;
-                }
-            }
+            s_eol = strchrW(s, '\n');
 
             /* If it is a comment line then discard it and go around again */
             if (buf[0] == '#') {




More information about the wine-cvs mailing list