aboutsummaryrefslogtreecommitdiff
path: root/libdwelf/dwelf_strtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwelf/dwelf_strtab.c')
-rw-r--r--libdwelf/dwelf_strtab.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libdwelf/dwelf_strtab.c b/libdwelf/dwelf_strtab.c
index c6ae7cdf..5ec8c295 100644
--- a/libdwelf/dwelf_strtab.c
+++ b/libdwelf/dwelf_strtab.c
@@ -91,8 +91,7 @@ dwelf_strtab_init (bool nullstr)
assert (sizeof (struct memoryblock) < ps - MALLOC_OVERHEAD);
}
- Dwelf_Strtab *ret
- = (Dwelf_Strtab *) calloc (1, sizeof (struct Dwelf_Strtab));
+ Dwelf_Strtab *ret = calloc (1, sizeof (struct Dwelf_Strtab));
if (ret != NULL)
{
ret->nullstr = nullstr;
@@ -117,7 +116,7 @@ morememory (Dwelf_Strtab *st, size_t len)
/* Allocate nearest multiple of pagesize >= len. */
len = ((len / ps) + (len % ps != 0)) * ps - MALLOC_OVERHEAD;
- struct memoryblock *newmem = (struct memoryblock *) malloc (len);
+ struct memoryblock *newmem = malloc (len);
if (newmem == NULL)
return 1;