ntdll: Cast-qual warning fix (Resend)

Andrew Talbot Andrew.Talbot at talbotville.com
Thu Jul 26 11:34:52 CDT 2007


What is wrong with this patch, please?

Thanks,

-- Andy.
---
Changelog:
    ntdll: Cast-qual warning fix.

diff -urN a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
--- a/dlls/ntdll/directory.c	2007-06-29 14:16:57.000000000 +0100
+++ b/dlls/ntdll/directory.c	2007-07-24 23:40:54.000000000 +0100
@@ -1460,8 +1460,11 @@
 static inline WCHAR *mempbrkW( const WCHAR *ptr, const WCHAR *accept, size_t n )
 {
     const WCHAR *end;
-    for (end = ptr + n; ptr < end; ptr++) if (strchrW( accept, *ptr )) return (WCHAR *)ptr;
-    return NULL;
+    WCHAR *ret = NULL;
+
+    for (end = ptr + n; ptr < end && !((ret = strchrW( accept, *ptr ))); ++ptr)
+        ;
+    return ret;
 }
 
 /******************************************************************************



More information about the wine-patches mailing list