mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 20:08:13 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -138,7 +138,7 @@ static int SDL_ANDROID_SensorInit(void)
|
||||
ASensorList sensors;
|
||||
|
||||
SDL_sensor_manager = ASensorManager_getInstance();
|
||||
if (SDL_sensor_manager == NULL) {
|
||||
if (!SDL_sensor_manager) {
|
||||
return SDL_SetError("Couldn't create sensor manager");
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ static int SDL_ANDROID_SensorInit(void)
|
||||
sensors_count = ASensorManager_getSensorList(SDL_sensor_manager, &sensors);
|
||||
if (sensors_count > 0) {
|
||||
SDL_sensors = (SDL_AndroidSensor *)SDL_calloc(sensors_count, sizeof(*SDL_sensors));
|
||||
if (SDL_sensors == NULL) {
|
||||
if (!SDL_sensors) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user