mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 13:56:00 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -51,7 +51,7 @@ static int SDL_VITA_SensorInit(void)
|
||||
SDL_sensors_count = 2;
|
||||
|
||||
SDL_sensors = (SDL_VitaSensor *)SDL_calloc(SDL_sensors_count, sizeof(*SDL_sensors));
|
||||
if (SDL_sensors == NULL) {
|
||||
if (!SDL_sensors) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ static int SDL_VITA_SensorOpen(SDL_Sensor *sensor, int device_index)
|
||||
struct sensor_hwdata *hwdata;
|
||||
|
||||
hwdata = (struct sensor_hwdata *)SDL_calloc(1, sizeof(*hwdata));
|
||||
if (hwdata == NULL) {
|
||||
if (!hwdata) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
sensor->hwdata = hwdata;
|
||||
|
Reference in New Issue
Block a user