Replace "if (x) free (x)" with "free (x)", ld
[deliverable/binutils-gdb.git] / ld / ldmisc.c
index cc090a5101033d3929a9bb1904d8745e4d3acadf..418e8d5c6eda8a3a570b90e39ce60eacd94939d4 100644 (file)
@@ -375,13 +375,11 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
                                    abfd, functionname);
 
                            last_bfd = abfd;
-                           if (last_file != NULL)
-                             free (last_file);
+                           free (last_file);
                            last_file = NULL;
                            if (filename)
                              last_file = xstrdup (filename);
-                           if (last_function != NULL)
-                             free (last_function);
+                           free (last_function);
                            last_function = xstrdup (functionname);
                          }
                        discard_last = FALSE;
@@ -412,16 +410,10 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
                if (discard_last)
                  {
                    last_bfd = NULL;
-                   if (last_file != NULL)
-                     {
-                       free (last_file);
-                       last_file = NULL;
-                     }
-                   if (last_function != NULL)
-                     {
-                       free (last_function);
-                       last_function = NULL;
-                     }
+                   free (last_file);
+                   last_file = NULL;
+                   free (last_function);
+                   last_function = NULL;
                  }
              }
              break;
This page took 0.030144 seconds and 4 git commands to generate.