summaryrefslogtreecommitdiffstats
path: root/libelf/elf_newdata.c
diff options
context:
space:
mode:
authorDmitry V. Levin <[email protected]>2021-09-06 08:00:00 +0000
committerDmitry V. Levin <[email protected]>2021-09-09 08:01:00 +0000
commite094270980f1ca8af86a64cee0dbb6f1df670619 (patch)
tree1471f9586bb9e3d7f5448001353d47e94145a4ae /libelf/elf_newdata.c
parent02b05e183998943dd5a19ba783b8793e2ab9ab44 (diff)
Remove redundant casts of memory allocating functions returning void *
Return values of functions returning "void *", e.g. calloc, malloc, realloc, xcalloc, xmalloc, and xrealloc, do not need explicit casts. Signed-off-by: Dmitry V. Levin <[email protected]>
Diffstat (limited to 'libelf/elf_newdata.c')
-rw-r--r--libelf/elf_newdata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libelf/elf_newdata.c b/libelf/elf_newdata.c
index 896f22cd..0063d599 100644
--- a/libelf/elf_newdata.c
+++ b/libelf/elf_newdata.c
@@ -106,7 +106,7 @@ elf_newdata (Elf_Scn *scn)
}
/* Create a new, empty data descriptor. */
- result = (Elf_Data_List *) calloc (1, sizeof (Elf_Data_List));
+ result = calloc (1, sizeof (Elf_Data_List));
if (result == NULL)
{
__libelf_seterrno (ELF_E_NOMEM);