aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-08-03 10:59:38 +0930
committerAlan Modra <amodra@gmail.com>2020-08-03 10:59:38 +0930
commitee44c2ac7b3efdfd28c41cd32d7fb935b0582a97 (patch)
treeff9262170c720c2e0453664a2ac5a1d481d2b394 /ld/lexsup.c
parentbfd133d0d8432d80ea1cbfc1fc38adee0d502ba3 (diff)
downloadgdb-ee44c2ac7b3efdfd28c41cd32d7fb935b0582a97.zip
gdb-ee44c2ac7b3efdfd28c41cd32d7fb935b0582a97.tar.gz
gdb-ee44c2ac7b3efdfd28c41cd32d7fb935b0582a97.tar.bz2
Use xmalloc rather than malloc
As far as I can tell, the following comment is false nowadays. /* Calls to m-alloc get turned by sed into xm-alloc. */ Remove it, and call xmalloc. * ldlex.l (yy_create_string_buffer): Use xmalloc rather than malloc. * lexsup.c (parse_args): Likewise.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 2c2d0fc..b9cc8a1 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -617,7 +617,7 @@ parse_args (unsigned argc, char **argv)
longopts = (struct option *)
xmalloc (sizeof (*longopts) * (OPTION_COUNT + 1));
really_longopts = (struct option *)
- malloc (sizeof (*really_longopts) * (OPTION_COUNT + 1));
+ xmalloc (sizeof (*really_longopts) * (OPTION_COUNT + 1));
/* Starting the short option string with '-' is for programs that
expect options and other ARGV-elements in any order and that care about