diff options
| author | Dmitry V. Levin <[email protected]> | 2021-09-06 08:00:00 +0000 |
|---|---|---|
| committer | Dmitry V. Levin <[email protected]> | 2021-09-09 08:01:00 +0000 |
| commit | e094270980f1ca8af86a64cee0dbb6f1df670619 (patch) | |
| tree | 1471f9586bb9e3d7f5448001353d47e94145a4ae /libelf/elf32_updatefile.c | |
| parent | 02b05e183998943dd5a19ba783b8793e2ab9ab44 (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/elf32_updatefile.c')
| -rw-r--r-- | libelf/elf32_updatefile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c index f67e6261..1ff58900 100644 --- a/libelf/elf32_updatefile.c +++ b/libelf/elf32_updatefile.c @@ -218,7 +218,7 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) return 1; Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; - Elf_Scn **scns = (Elf_Scn **) malloc (shnum * sizeof (Elf_Scn *)); + Elf_Scn **scns = malloc (shnum * sizeof (Elf_Scn *)); if (unlikely (scns == NULL)) { __libelf_seterrno (ELF_E_NOMEM); @@ -688,7 +688,7 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) /* Get all sections into the array and sort them. */ Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; - Elf_Scn **scns = (Elf_Scn **) malloc (shnum * sizeof (Elf_Scn *)); + Elf_Scn **scns = malloc (shnum * sizeof (Elf_Scn *)); if (unlikely (scns == NULL)) { free (shdr_data_mem); |
