src/thread/windows/SDL_syssem.c
changeset 7037 3fedf1f25b94
parent 6885 700f1b25f77f
child 8093 b43765095a6f
     1.1 --- a/src/thread/windows/SDL_syssem.c	Fri Mar 29 21:29:57 2013 -0400
     1.2 +++ b/src/thread/windows/SDL_syssem.c	Sun Mar 31 12:48:50 2013 -0400
     1.3 @@ -78,8 +78,7 @@
     1.4      DWORD dwMilliseconds;
     1.5  
     1.6      if (!sem) {
     1.7 -        SDL_SetError("Passed a NULL sem");
     1.8 -        return -1;
     1.9 +        return SDL_SetError("Passed a NULL sem");
    1.10      }
    1.11  
    1.12      if (timeout == SDL_MUTEX_MAXWAIT) {
    1.13 @@ -96,8 +95,7 @@
    1.14          retval = SDL_MUTEX_TIMEDOUT;
    1.15          break;
    1.16      default:
    1.17 -        SDL_SetError("WaitForSingleObject() failed");
    1.18 -        retval = -1;
    1.19 +        retval = SDL_SetError("WaitForSingleObject() failed");
    1.20          break;
    1.21      }
    1.22      return retval;
    1.23 @@ -130,8 +128,7 @@
    1.24  SDL_SemPost(SDL_sem * sem)
    1.25  {
    1.26      if (!sem) {
    1.27 -        SDL_SetError("Passed a NULL sem");
    1.28 -        return -1;
    1.29 +        return SDL_SetError("Passed a NULL sem");
    1.30      }
    1.31      /* Increase the counter in the first place, because
    1.32       * after a successful release the semaphore may
    1.33 @@ -141,8 +138,7 @@
    1.34      InterlockedIncrement(&sem->count);
    1.35      if (ReleaseSemaphore(sem->id, 1, NULL) == FALSE) {
    1.36          InterlockedDecrement(&sem->count);      /* restore */
    1.37 -        SDL_SetError("ReleaseSemaphore() failed");
    1.38 -        return -1;
    1.39 +        return SDL_SetError("ReleaseSemaphore() failed");
    1.40      }
    1.41      return 0;
    1.42  }