aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-05-20 22:49:01 +0930
committerAlan Modra <amodra@gmail.com>2020-05-21 10:45:33 +0930
commit9fbb53c7c8d54ec90dc308cfb50902b90900b946 (patch)
tree8515c6ad77b83d750fc107937f06c8816c4dfc2e /gas/read.c
parent9db70fc3656064555873332003d842b880ca470c (diff)
downloadgdb-9fbb53c7c8d54ec90dc308cfb50902b90900b946.zip
gdb-9fbb53c7c8d54ec90dc308cfb50902b90900b946.tar.gz
gdb-9fbb53c7c8d54ec90dc308cfb50902b90900b946.tar.bz2
Replace "if (x) free (x)" with "free (x)", gas
* atof-generic.c: Replace "if (x) free (x)" with "free (x)" throughout. * config/obj-elf.c: Likewise. * config/tc-aarch64.c: Likewise. * config/tc-arm.c: Likewise. * config/tc-m68k.c: Likewise. * config/tc-nios2.c: Likewise. * config/tc-tic30.c: Likewise. * ecoff.c: Likewise. * read.c: Likewise. * stabs.c: Likewise. * symbols.c: Likewise. * testsuite/gas/all/test-gen.c: Likewise.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gas/read.c b/gas/read.c
index cdb4b3a..8f93c2b 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1332,8 +1332,7 @@ read_a_source_file (const char *name)
new_length += 100;
}
- if (tmp_buf)
- free (tmp_buf);
+ free (tmp_buf);
/* We've "scrubbed" input to the preferred format. In the
process we may have consumed the whole of the remaining
@@ -1801,8 +1800,7 @@ s_comm_internal (int param,
out:
if (flag_mri)
mri_comment_end (stop, stopc);
- if (name != NULL)
- free (name);
+ free (name);
return symbolP;
}
@@ -1862,8 +1860,7 @@ s_mri_common (int small ATTRIBUTE_UNUSED)
sym = symbol_find_or_make (name);
c = restore_line_pointer (c);
- if (alc != NULL)
- free (alc);
+ free (alc);
if (*input_line_pointer != ',')
align = 0;
@@ -5814,8 +5811,7 @@ s_incbin (int x ATTRIBUTE_UNUSED)
done:
if (binfile != NULL)
fclose (binfile);
- if (path)
- free (path);
+ free (path);
}
/* .include -- include a file at this point. */