OSDN Git Service

disk_cache: remove unnecessary NULL-pointer guards
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 10 Oct 2017 11:58:45 +0000 (13:58 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 10 Oct 2017 11:58:45 +0000 (13:58 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/util/disk_cache.c

index 63fd8e1..e38cacb 100644 (file)
@@ -987,10 +987,8 @@ cache_put(void *job, int thread_index)
     */
    if (fd != -1)
       close(fd);
-   if (filename_tmp)
-      free(filename_tmp);
-   if (filename)
-      free(filename);
+   free(filename_tmp);
+   free(filename);
 }
 
 void