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 9360c671d8ca48a1
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
     1.1 --- a/src/haptic/linux/SDL_syshaptic.c	Wed Feb 18 16:25:15 2015 -0500
     1.2 +++ b/src/haptic/linux/SDL_syshaptic.c	Thu Feb 19 13:11:19 2015 -0500
     1.3 @@ -288,8 +288,7 @@
     1.4      }
     1.5  
     1.6      item->fname = SDL_strdup(path);
     1.7 -    if ( (item->fname == NULL) ) {
     1.8 -        SDL_free(item->fname);
     1.9 +    if (item->fname == NULL) {
    1.10          SDL_free(item);
    1.11          return -1;
    1.12      }