From d9f02858fdc04c4404834a033850f758e4c8ee7e Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 21 Dec 2013 13:21:59 +1000 Subject: Replace NULL's with 0 as NULL is not defined by the Raw32 GOS. --- src/gos/chibios.c | 2 +- src/gos/osx.c | 2 +- src/gos/win32.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gos') diff --git a/src/gos/chibios.c b/src/gos/chibios.c index 3af0047b..30a2b228 100644 --- a/src/gos/chibios.c +++ b/src/gos/chibios.c @@ -106,7 +106,7 @@ gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_ } if (!stacksz) - return NULL; + return 0; return chThdCreateStatic(stackarea, stacksz, prio, fn, param); } diff --git a/src/gos/osx.c b/src/gos/osx.c index 3692fe5e..a5560b4e 100644 --- a/src/gos/osx.c +++ b/src/gos/osx.c @@ -149,7 +149,7 @@ bool_t gfxSemWait(gfxSem *pSem, delaytime_t ms) { struct timeval now; struct timespec tm; - gettimeofday(&now, NULL); + gettimeofday(&now, 0); tm.tv_sec = now.tv_sec + ms / 1000; tm.tv_nsec = (now.tv_usec + ms % 1000) * 1000; while (!pSem->cnt) { diff --git a/src/gos/win32.c b/src/gos/win32.c index 77b35dc3..a05e5c30 100644 --- a/src/gos/win32.c +++ b/src/gos/win32.c @@ -57,7 +57,7 @@ void gfxSleepMicroseconds(delaytime_t ms) { void gfxSystemLock(void) { if (!SystemMutex) - SystemMutex = CreateMutex(NULL, FALSE, NULL); + SystemMutex = CreateMutex(0, FALSE, 0); WaitForSingleObject(SystemMutex, INFINITE); } @@ -87,7 +87,7 @@ semcount_t gfxSemCounter(gfxSem *pSem) { if (!NtQuerySemaphore) NtQuerySemaphore = (_NtQuerySemaphore)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQuerySemaphore"); - NtQuerySemaphore(*pSem, 0, &BasicInfo, sizeof(BasicInfo), NULL); + NtQuerySemaphore(*pSem, 0, &BasicInfo, sizeof(BasicInfo), 0); return BasicInfo.CurrentCount; } @@ -96,7 +96,7 @@ gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_ (void) stackarea; HANDLE thd; - if (!(thd = CreateThread(NULL, stacksz, fn, param, CREATE_SUSPENDED, NULL))) + if (!(thd = CreateThread(0, stacksz, fn, param, CREATE_SUSPENDED, 0))) return FALSE; SetThreadPriority(thd, prio); -- cgit v1.2.3