From 4a8648d7a8616b838f45f2c10346039fd6701338 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 Feb 2006 19:24:09 +0000 Subject: [PATCH] Fixed build warnings on Intel Mac --- src/joystick/darwin/SDL_sysjoystick.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index 92829b3a7..d8cbb257d 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -585,15 +585,15 @@ static recDevice *HIDDisposeDevice (recDevice **ppDevice) int SDL_SYS_JoystickInit(void) { IOReturn result = kIOReturnSuccess; - mach_port_t masterPort = NULL; - io_iterator_t hidObjectIterator = NULL; + mach_port_t masterPort = 0; + io_iterator_t hidObjectIterator = 0; CFMutableDictionaryRef hidMatchDictionary = NULL; recDevice *device, *lastDevice; - io_object_t ioHIDDeviceObject = NULL; + io_object_t ioHIDDeviceObject = 0; SDL_numjoysticks = 0; - if (NULL != gpDeviceList) + if (!gpDeviceList) { SDL_SetError("Joystick: Device list already inited."); return -1; @@ -608,7 +608,7 @@ int SDL_SYS_JoystickInit(void) /* Set up a matching dictionary to search I/O Registry by class name for all HID class devices. */ hidMatchDictionary = IOServiceMatching (kIOHIDDeviceKey); - if ((hidMatchDictionary != NULL)) + if (hidMatchDictionary) { /* Add key for device type (joystick, in this case) to refine the matching dictionary. */ @@ -637,7 +637,7 @@ int SDL_SYS_JoystickInit(void) SDL_SetError("Joystick: Couldn't create a HID object iterator."); return -1; } - if (NULL == hidObjectIterator) /* there are no joysticks */ + if (!hidObjectIterator) /* there are no joysticks */ { gpDeviceList = NULL; SDL_numjoysticks = 0;