Check standard error code return values as < 0 instead of == -1
This commit is contained in:
@@ -25,7 +25,7 @@ static void tryOpenURL(const char *url)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
if (SDL_Init(SDL_INIT_VIDEO) == -1) {
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
SDL_Log("SDL_Init failed: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user