fixed malloc() cast

This commit is contained in:
git@daemon.de
2014-01-28 12:21:03 +01:00
parent 5ae1d07067
commit c18686804b

View File

@@ -43,7 +43,7 @@ static inline void p_add(plist_t **lst, char *value) {
plist_t *iter = *lst; plist_t *iter = *lst;
newitem = (plist_t *)malloc(sizeof(plist_t)); newitem = (plist_t *)malloc(sizeof(plist_t));
newitem->value = malloc(strlen(value) + 1); newitem->value = (char *)malloc(strlen(value) + 1);
strncpy(newitem->value, value, strlen(value) + 1); strncpy(newitem->value, value, strlen(value) + 1);
newitem->next = NULL; newitem->next = NULL;