summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2023-12-30 20:49:48 +0100
committerTim Wiederhake <twied@gmx.net>2024-01-21 13:14:37 +0100
commit365a94b62df6144ad016e587f3756d974b6e2018 (patch)
tree08182cf099e612ba7830c929375c56c06035368a /src/list.c
parent7fe0acdb259c7dd9f3b6214ba16f272da81beadb (diff)
Add explicit cast after memory allocation
Still valid c, but now also valid c++. Signed-off-by: Tim Wiederhake <twied@gmx.net>
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/list.c b/src/list.c
index f7fa724..cceba24 100644
--- a/src/list.c
+++ b/src/list.c
@@ -90,7 +90,7 @@ AddToList(name_list ** list_head, char *name, char *ptr)
if (!list_head)
return; /* ignore empty inserts */
- nptr = malloc(sizeof(name_list));
+ nptr = (name_list *) malloc(sizeof(name_list));
if (nptr == NULL) {
parseWarning("unable to allocate %lu bytes for name_list",
(unsigned long) sizeof(name_list));