diff options
author | Tim Wiederhake <twied@gmx.net> | 2023-12-30 20:49:48 +0100 |
---|---|---|
committer | Tim Wiederhake <twied@gmx.net> | 2024-01-21 13:14:37 +0100 |
commit | 365a94b62df6144ad016e587f3756d974b6e2018 (patch) | |
tree | 08182cf099e612ba7830c929375c56c06035368a /src/list.c | |
parent | 7fe0acdb259c7dd9f3b6214ba16f272da81beadb (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); |