Kaynağa Gözat

PSP: Fixed error handling in SDL_SemWaitTimeout().

Signed integers were converted to unsigned before being checked if smaller 0.

Found by Cppcheck.
Philipp Wiesemann 11 yıl önce
ebeveyn
işleme
2919905620
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/thread/psp/SDL_syssem.c

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

@@ -79,7 +79,7 @@ void SDL_DestroySemaphore(SDL_sem *sem)
 int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
 {
     Uint32 *pTimeout;
-       unsigned int res;
+    int res;
 
     if (sem == NULL) {
         SDL_SetError("Passed a NULL sem");