Remove unnecessary parentheses and an unnecessary free() of a NULL pointer.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 19 Feb 2015 13:11:19 -0500
changeset 9360 c671d8ca48a1
parent 9359 3d0af39849fa
child 9361 17a2821b451c
Remove unnecessary parentheses and an unnecessary free() of a NULL pointer. (Thanks, Simon!) Fixes Bugzilla #2881.
src/haptic/linux/SDL_syshaptic.c
--- a/src/haptic/linux/SDL_syshaptic.c	Wed Feb 18 16:25:15 2015 -0500
+++ b/src/haptic/linux/SDL_syshaptic.c	Thu Feb 19 13:11:19 2015 -0500
@@ -288,8 +288,7 @@
     }
 
     item->fname = SDL_strdup(path);
-    if ( (item->fname == NULL) ) {
-        SDL_free(item->fname);
+    if (item->fname == NULL) {
         SDL_free(item);
         return -1;
     }