Forráskód Böngészése

thread: return -1 from SDL_SemWaitTimeout if semaphore is NULL

pionere 2 éve
szülő
commit
f6db1aba66

+ 1 - 2
src/thread/ps2/SDL_syssem.c

@@ -85,8 +85,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
     InitializeTimerAlarm(&alarm);
     
     if (sem == NULL) {
-        SDL_InvalidParamError("sem");
-        return 0;
+        return SDL_InvalidParamError("sem");
     }
 
     if (timeout == 0) {

+ 1 - 2
src/thread/psp/SDL_syssem.c

@@ -80,8 +80,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
     int res;
 
     if (sem == NULL) {
-        SDL_InvalidParamError("sem");
-        return 0;
+        return SDL_InvalidParamError("sem");
     }
 
     if (timeout == 0) {

+ 1 - 2
src/thread/vita/SDL_syssem.c

@@ -81,8 +81,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
        unsigned int res;
 
     if (sem == NULL) {
-        SDL_InvalidParamError("sem");
-        return 0;
+        return SDL_InvalidParamError("sem");
     }
 
     if (timeout == 0) {