mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 07:16:00 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -215,7 +215,7 @@ static int NETBSDAUDIO_OpenDevice(SDL_AudioDevice *device)
|
||||
|
||||
// Initialize all variables that we clean on shutdown
|
||||
device->hidden = (struct SDL_PrivateAudioData *) SDL_calloc(1, sizeof(*device->hidden));
|
||||
if (device->hidden == NULL) {
|
||||
if (!device->hidden) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ static int NETBSDAUDIO_OpenDevice(SDL_AudioDevice *device)
|
||||
// Allocate mixing buffer
|
||||
device->hidden->mixlen = device->buffer_size;
|
||||
device->hidden->mixbuf = (Uint8 *)SDL_malloc(device->hidden->mixlen);
|
||||
if (device->hidden->mixbuf == NULL) {
|
||||
if (!device->hidden->mixbuf) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
SDL_memset(device->hidden->mixbuf, device->silence_value, device->buffer_size);
|
||||
|
Reference in New Issue
Block a user