Christoph Mallon: Remove pointless if (x) before SDL_free(x)

This commit is contained in:
Sam Lantinga
2013-08-29 08:29:21 -07:00
parent 1d2c7796ae
commit f79fc33a39
63 changed files with 157 additions and 349 deletions

View File

@@ -437,22 +437,13 @@ SDL_JoystickClose(SDL_Joystick * joystick)
joysticklist = joysticklist->next;
}
if (joystick->name)
SDL_free(joystick->name);
SDL_free(joystick->name);
/* Free the data associated with this joystick */
if (joystick->axes) {
SDL_free(joystick->axes);
}
if (joystick->hats) {
SDL_free(joystick->hats);
}
if (joystick->balls) {
SDL_free(joystick->balls);
}
if (joystick->buttons) {
SDL_free(joystick->buttons);
}
SDL_free(joystick->axes);
SDL_free(joystick->hats);
SDL_free(joystick->balls);
SDL_free(joystick->buttons);
SDL_free(joystick);
}