msvcrt: Use NULL instead of casting zero.

Michael Stefaniuc mstefani at redhat.de
Fri Dec 5 00:47:01 CST 2008


---
 dlls/msvcrt/tests/scanf.c |    2 +-
 dlls/msvcrt/time.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c
index b152eac..cb005f9 100644
--- a/dlls/msvcrt/tests/scanf.c
+++ b/dlls/msvcrt/tests/scanf.c
@@ -51,7 +51,7 @@ static void test_sscanf( void )
     ok( ptr == (void *)0x46F172,"sscanf reads %p instead of %x\n", ptr, 0x46F172 );
 
     ok( sscanf("0x46F173", "%p", &ptr) == 1, "sscanf failed\n"  );
-    ok( ptr == (void *)0,"sscanf reads %p instead of %x\n", ptr, 0 );
+    ok( ptr == NULL,"sscanf reads %p instead of %x\n", ptr, 0 );
 
     ok( sscanf("-46F174", "%p", &ptr) == 1, "sscanf failed\n"  );
     ok( ptr == (void *)0xFFB90E8C,"sscanf reads %p instead of %x\n", ptr, 0xFFB90E8C );
diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c
index ba4e95c..b53cbcd 100644
--- a/dlls/msvcrt/time.c
+++ b/dlls/msvcrt/time.c
@@ -340,7 +340,7 @@ void CDECL MSVCRT__tzset(void)
         struct tm *tmp;
         long zone_january, zone_july;
 
-        t = (time((time_t *)0) / seconds_in_year) * seconds_in_year;
+        t = (time(NULL) / seconds_in_year) * seconds_in_year;
         tmp = localtime(&t);
         zone_january = -tmp->tm_gmtoff;
         t += seconds_in_year / 2;
-- 
1.6.0.rc1
-------------- 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/20081205/1795f3e5/attachment.pgp 


More information about the wine-patches mailing list