From a309755961a2eccf73aced8c6ecc962c82153166 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 19 Feb 2015 13:11:19 -0500 Subject: [PATCH] Remove unnecessary parentheses and an unnecessary free() of a NULL pointer. (Thanks, Simon!) Fixes Bugzilla #2881. --- src/haptic/linux/SDL_syshaptic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c index 63c81ab9b3c66..fba536b4885dd 100644 --- a/src/haptic/linux/SDL_syshaptic.c +++ b/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; }