From df2519c1ec39c07a587e12b0e4d3c0c69dbf08ae Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 4 Aug 2020 11:59:36 -0600 Subject: [PATCH] dict: cleanups --- libifupdown/dict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libifupdown/dict.c b/libifupdown/dict.c index 4906f26..cb725a6 100644 --- a/libifupdown/dict.c +++ b/libifupdown/dict.c @@ -104,7 +104,7 @@ lif_dict_find(struct lif_dict *dict, const char *key) struct lif_list * lif_dict_find_all(struct lif_dict *dict, const char *key) { - struct lif_list *entries = calloc(1, sizeof(struct lif_list)); + struct lif_list *entries = calloc(1, sizeof *entries); struct lif_node *iter; LIF_LIST_FOREACH(iter, dict->list.head) @@ -112,7 +112,7 @@ lif_dict_find_all(struct lif_dict *dict, const char *key) struct lif_dict_entry *entry = iter->data; if (!strcmp(entry->key, key)) { - struct lif_node *new = calloc(1, sizeof(struct lif_node)); + struct lif_node *new = calloc(1, sizeof *new); lif_node_insert_tail(new, entry->data, entries); } }