Browse Source

Remove unnecessary parentheses and an unnecessary free() of a NULL pointer.

(Thanks, Simon!)

Fixes Bugzilla #2881.
Ryan C. Gordon 10 years ago
parent
commit
a309755961
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/haptic/linux/SDL_syshaptic.c

+ 1 - 2
src/haptic/linux/SDL_syshaptic.c

@@ -288,8 +288,7 @@ MaybeAddDevice(const char *path)
     }
 
     item->fname = SDL_strdup(path);
-    if ( (item->fname == NULL) ) {
-        SDL_free(item->fname);
+    if (item->fname == NULL) {
         SDL_free(item);
         return -1;
     }