summaryrefslogtreecommitdiff
path: root/libelf/elf_getarsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'libelf/elf_getarsym.c')
-rw-r--r--libelf/elf_getarsym.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c
index 1f031fca..05ebf6a9 100644
--- a/libelf/elf_getarsym.c
+++ b/libelf/elf_getarsym.c
@@ -198,7 +198,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
/* Now we can allocate the arrays needed to store the index. */
size_t ar_sym_len = (n + 1) * sizeof (Elf_Arsym);
- elf->state.ar.ar_sym = (Elf_Arsym *) malloc (ar_sym_len);
+ elf->state.ar.ar_sym = malloc (ar_sym_len);
if (elf->state.ar.ar_sym != NULL)
{
void *file_data; /* unit32_t[n] or uint64_t[n] */
@@ -216,8 +216,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
file_data = temp_data;
ar_sym_len += index_size - n * w;
- Elf_Arsym *newp = (Elf_Arsym *) realloc (elf->state.ar.ar_sym,
- ar_sym_len);
+ Elf_Arsym *newp = realloc (elf->state.ar.ar_sym, ar_sym_len);
if (newp == NULL)
{
free (elf->state.ar.ar_sym);