shlwapi: Do not use wide character constants.

Michael Stefaniuc mstefani at redhat.de
Wed Jun 20 16:34:50 CDT 2007


They aren't needed and the implicit cast from the 32bit wchar_t to the
16bit WCHAR isn't that much better than the (Wine) normal implicit cast
from the 8bit char.

Actually i would have replaced the L'\0' with just 0 but i guess that's
a matter of taste so i left the character constant in.
---
 dlls/shlwapi/reg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c
index bdfea24..1f52883 100644
--- a/dlls/shlwapi/reg.c
+++ b/dlls/shlwapi/reg.c
@@ -703,7 +703,7 @@ BOOL WINAPI SHRegGetBoolUSValueW(
 	    /* process returned data via type into bool */
 	    switch (type) {
 	    case REG_SZ:
-		data[9] = L'\0';     /* set end of string */
+		data[9] = '\0';     /* set end of string */
 		if (lstrcmpiW(data, wYES)==0 || lstrcmpiW(data, wTRUE)==0)
 		    ret = TRUE;
 		else if (lstrcmpiW(data, wNO)==0 || lstrcmpiW(data, wFALSE)==0)
@@ -715,7 +715,7 @@ BOOL WINAPI SHRegGetBoolUSValueW(
 		break;
 	    case REG_BINARY:
 		if (datalen == 1) {
-		    ret = (data[0] != L'\0');
+		    ret = (data[0] != '\0');
 		    break;
 		}
 	    default:
-- 
1.5.0.6


-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070620/836c1a51/attachment.pgp


More information about the wine-patches mailing list