瀏覽代碼

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

(Thanks, Simon!)

Fixes Bugzilla #2881.
Ryan C. Gordon 11 年之前
父節點
當前提交
a309755961
共有 1 個文件被更改,包括 1 次插入2 次删除
  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;
     }