Commit c9e8d1573a140e3d9a0ac848479f25bce38ee01f

pionere 2022-01-19T12:59:35

re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory II.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 8ada21e..6b325a3 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -404,8 +404,7 @@ add_audio_device(const char *name, SDL_AudioSpec *spec, void *handle, SDL_AudioD
             SDL_UnlockMutex(current_audio.detectionLock);
             SDL_free(item->original_name);
             SDL_free(item);
-            SDL_OutOfMemory();
-            return -1;
+            return SDL_OutOfMemory();
         }
 
         SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1);