summaryrefslogtreecommitdiffstats
path: root/src/nm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm.c')
-rw-r--r--src/nm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nm.c b/src/nm.c
index b99805e8..2ae29c4d 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -687,8 +687,7 @@ get_local_names (Dwarf *dbg)
}
/* We have all the information. Create a record. */
- struct local_name *newp
- = (struct local_name *) xmalloc (sizeof (*newp));
+ struct local_name *newp = xmalloc (sizeof (*newp));
newp->name = name;
newp->file = dwarf_filesrc (files, fileidx, NULL, NULL);
newp->lineno = lineno;
@@ -736,7 +735,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
bool scnnames_malloced = shnum * sizeof (const char *) > 128 * 1024;
const char **scnnames;
if (scnnames_malloced)
- scnnames = (const char **) xmalloc (sizeof (const char *) * shnum);
+ scnnames = xmalloc (sizeof (const char *) * shnum);
else
scnnames = (const char **) alloca (sizeof (const char *) * shnum);
/* Get the section header string table index. */
@@ -1340,7 +1339,7 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr,
if (nentries * sizeof (GElf_SymX) < MAX_STACK_ALLOC)
sym_mem = (GElf_SymX *) alloca (nentries * sizeof (GElf_SymX));
else
- sym_mem = (GElf_SymX *) xmalloc (nentries * sizeof (GElf_SymX));
+ sym_mem = xmalloc (nentries * sizeof (GElf_SymX));
/* Iterate over all symbols. */
#ifdef USE_DEMANGLE