summaryrefslogtreecommitdiff
path: root/libdwfl
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2021-09-06 08:00:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2021-09-09 08:01:00 +0000
commite094270980f1ca8af86a64cee0dbb6f1df670619 (patch)
tree1471f9586bb9e3d7f5448001353d47e94145a4ae /libdwfl
parent02b05e183998943dd5a19ba783b8793e2ab9ab44 (diff)
downloadelfutils-e094270980f1ca8af86a64cee0dbb6f1df670619.tar.gz
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 <ldv@altlinux.org>
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/linux-pid-attach.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 1fce7af2..d35674c7 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2021-09-06 Dmitry V. Levin <ldv@altlinux.org>
+
+ * linux-pid-attach.c (read_cached_memory): Remove cast of malloc
+ return value.
+
2021-06-09 Omar Sandoval <osandov@fb.com>
* link_map.c (read_addrs): Fix potential NULL pointer dereference.
diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
index cd534825..09cba07b 100644
--- a/libdwfl/linux-pid-attach.c
+++ b/libdwfl/linux-pid-attach.c
@@ -135,7 +135,7 @@ read_cached_memory (struct __libdwfl_pid_arg *pid_arg,
if (mem_cache == NULL)
{
size_t mem_cache_size = sizeof (struct __libdwfl_remote_mem_cache);
- mem_cache = (struct __libdwfl_remote_mem_cache *) malloc (mem_cache_size);
+ mem_cache = malloc (mem_cache_size);
if (mem_cache == NULL)
return false;