[Commits] SDL: PSP: Fixed error handling in SDL_SemWaitTimeout().

libsdl.org revision control commits-owner at libsdl.org
Wed Jul 15 12:16:39 PDT 2015


details:   https://hg.libsdl.org/SDL/rev/5ab98ac27e96
changeset: 9803:5ab98ac27e96
user:      Philipp Wiesemann <philipp.wiesemann at arcor.de>
date:      Wed Jul 15 21:11:24 2015 +0200
description:
PSP: Fixed error handling in SDL_SemWaitTimeout().

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

Found by Cppcheck.

diffstat:

 src/thread/psp/SDL_syssem.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 387821246318 -r 5ab98ac27e96 src/thread/psp/SDL_syssem.c
--- a/src/thread/psp/SDL_syssem.c	Wed Jul 15 21:10:38 2015 +0200
+++ b/src/thread/psp/SDL_syssem.c	Wed Jul 15 21:11:24 2015 +0200
@@ -79,7 +79,7 @@
 int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
 {
     Uint32 *pTimeout;
-       unsigned int res;
+    int res;
 
     if (sem == NULL) {
         SDL_SetError("Passed a NULL sem");


More information about the commits mailing list