aboutsummaryrefslogtreecommitdiff
path: root/binutils/windres.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-05-20 22:48:41 +0930
committerAlan Modra <amodra@gmail.com>2020-05-21 10:45:33 +0930
commit9db70fc3656064555873332003d842b880ca470c (patch)
treed1aaec716012f043f5ba4aa0e43bf879a32be214 /binutils/windres.c
parentc95949892f6f1e2974a0fb8a5463d7b6432ac469 (diff)
downloadgdb-9db70fc3656064555873332003d842b880ca470c.zip
gdb-9db70fc3656064555873332003d842b880ca470c.tar.gz
gdb-9db70fc3656064555873332003d842b880ca470c.tar.bz2
Replace "if (x) free (x)" with "free (x)", binutils
* addr2line.c: Replace "if (x) free (x)" with "free (x)" throughout. * dlltool.c: Likewise. * elfcomm.c: Likewise. * rddbg.c: Likewise. * readelf.c: Likewise. * stabs.c: Likewise. * windmc.c: Likewise. * windres.c: Likewise. * wrstabs.c: Likewise.
Diffstat (limited to 'binutils/windres.c')
-rw-r--r--binutils/windres.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/binutils/windres.c b/binutils/windres.c
index 9b921ba..427e982 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -704,8 +704,7 @@ quot (const char *string)
if ((buflen < slen * 2 + 2) || ! buf)
{
buflen = slen * 2 + 2;
- if (buf)
- free (buf);
+ free (buf);
buf = (char *) xmalloc (buflen);
}