Explorar o código

Removed redundant NULL check in test program.

Philipp Wiesemann %!s(int64=11) %!d(string=hai) anos
pai
achega
4f00dda95d
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      test/testgamecontroller.c

+ 2 - 4
test/testgamecontroller.c

@@ -294,10 +294,8 @@ main(int argc, char *argv[])
             while (keepGoing) {
                 if (gamecontroller == NULL) {
                     if (!reportederror) {
-                        if (gamecontroller == NULL) {
-                            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open gamecontroller %d: %s\n", device, SDL_GetError());
-                            retcode = 1;
-                        }
+                        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open gamecontroller %d: %s\n", device, SDL_GetError());
+                        retcode = 1;
                         keepGoing = SDL_FALSE;
                         reportederror = SDL_TRUE;
                     }