Alexandre Julliard : libwine: Avoid converting the final null in strlwrW and struprW.

Alexandre Julliard julliard at winehq.org
Thu Sep 8 14:52:10 CDT 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Sep  8 11:16:51 2011 +0200

libwine: Avoid converting the final null in strlwrW and struprW.

---

 include/wine/unicode.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index b685e43..35c6166 100644
--- a/include/wine/unicode.h
+++ b/include/wine/unicode.h
@@ -265,15 +265,15 @@ WINE_UNICODE_INLINE size_t strcspnW( const WCHAR *str, const WCHAR *reject )
 
 WINE_UNICODE_INLINE WCHAR *strlwrW( WCHAR *str )
 {
-    WCHAR *ret = str;
-    while ((*str = tolowerW(*str))) str++;
+    WCHAR *ret;
+    for (ret = str; *str; str++) *str = tolowerW(*str);
     return ret;
 }
 
 WINE_UNICODE_INLINE WCHAR *struprW( WCHAR *str )
 {
-    WCHAR *ret = str;
-    while ((*str = toupperW(*str))) str++;
+    WCHAR *ret;
+    for (ret = str; *str; str++) *str = toupperW(*str);
     return ret;
 }
 




More information about the wine-cvs mailing list