Просмотр исходного кода

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

(Thanks, Simon!)

Fixes Bugzilla #2881.
Ryan C. Gordon 11 лет назад
Родитель
Сommit
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;
     }