Pointer as bool (libsdl-org#7214)

This commit is contained in:
Sylvain
2023-11-09 22:29:15 +01:00
committed by Sam Lantinga
parent 23db971681
commit d8600f717e
371 changed files with 2448 additions and 2442 deletions

View File

@@ -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();
}