Make SDL_SetError and friends unconditionally return -1.

This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
This commit is contained in:
Ryan C. Gordon 2013-03-31 12:48:50 -04:00
parent 8c6b9f4743
commit 4f438b70a2
106 changed files with 616 additions and 1189 deletions

View file

@ -251,7 +251,7 @@ SDLTest_GenerateUnsignedBoundaryValues(const Uint64 maxValue, Uint64 boundary1,
if (index == 0) {
/* There are no valid boundaries */
SDL_Error(SDL_UNSUPPORTED);
SDL_Unsupported();
return 0;
}
@ -379,7 +379,7 @@ SDLTest_GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValu
if (index == 0) {
/* There are no valid boundaries */
SDL_Error(SDL_UNSUPPORTED);
SDL_Unsupported();
return minValue;
}