Commit 4f00dda95ded87b1554688b3ecea7e495a257385

Philipp Wiesemann 2015-05-21T21:27:53

Removed redundant NULL check in test program.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 2eb3686..d2dc902 100644
--- a/test/testgamecontroller.c
+++ b/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;
                     }