Skip to content

Commit

Permalink
Fixed build warnings on Intel Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 21, 2006
1 parent 9f4777c commit 4a8648d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -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;
Expand All @@ -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. */

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4a8648d

Please sign in to comment.