# HG changeset patch # User Sam Lantinga # Date 1140549849 0 # Node ID ebc8b58550401505b4376065377e141797f0042c # Parent ceb5c2fec4f180471913737925d768614e517f96 Fixed build warnings on Intel Mac diff -r ceb5c2fec4f1 -r ebc8b5855040 src/joystick/darwin/SDL_sysjoystick.c --- a/src/joystick/darwin/SDL_sysjoystick.c Tue Feb 21 18:29:39 2006 +0000 +++ b/src/joystick/darwin/SDL_sysjoystick.c Tue Feb 21 19:24:09 2006 +0000 @@ -585,15 +585,15 @@ 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 @@ /* 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 @@ 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;