Check standard error code return values as < 0 instead of == -1

This commit is contained in:
Sam Lantinga
2024-08-22 06:53:25 -07:00
parent 46d9066a69
commit 037541a0e0
29 changed files with 59 additions and 59 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
}
/* Load the wave file into memory */
if (SDL_LoadWAV(filename, &spec, &sound, &soundlen) == -1) {
if (SDL_LoadWAV(filename, &spec, &sound, &soundlen) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename, SDL_GetError());
quit(1);
}