Skip to content

Commit

Permalink
Remove unnecessary parentheses and an unnecessary free() of a NULL po…
Browse files Browse the repository at this point in the history
…inter.

(Thanks, Simon!)

Fixes Bugzilla #2881.
  • Loading branch information
icculus committed Feb 19, 2015
1 parent 80ba854 commit a309755
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/haptic/linux/SDL_syshaptic.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit a309755

Please sign in to comment.