aboutsummaryrefslogtreecommitdiff
path: root/src/binds.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-02-10 00:49:27 +0000
committerHarry Jeffery <harry@exec64.co.uk>2019-02-10 00:49:27 +0000
commit551464706c848526646a20b5b4172cda69f0e005 (patch)
tree44d39aead773aca821fcb51bd2ce18372ba99d10 /src/binds.c
parenta306cd551640286eb1ad189e87bf7815b5a94de8 (diff)
downloadimv-551464706c848526646a20b5b4172cda69f0e005.tar.gz
Tweak allocation sizeof operator usage
Diffstat (limited to 'src/binds.c')
-rw-r--r--src/binds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binds.c b/src/binds.c
index a38fe1a..0647d5a 100644
--- a/src/binds.c
+++ b/src/binds.c
@@ -42,7 +42,7 @@ static void destroy_bind_node(struct bind_node *bn)
struct imv_binds *imv_binds_create(void)
{
- struct imv_binds *binds = malloc(sizeof(struct imv_binds));
+ struct imv_binds *binds = malloc(sizeof *binds);
init_bind_node(&binds->bind_tree);
binds->keys = list_create();
return binds;
@@ -82,7 +82,7 @@ enum bind_result imv_binds_add(struct imv_binds *binds, const struct list *keys,
int child_index = list_find(node->suffixes, &compare_node_key, keys->items[i]);
if(child_index == -1) {
/* Create our new node */
- next_node = malloc(sizeof(struct bind_node));
+ next_node = malloc(sizeof *next_node);
init_bind_node(next_node);
next_node->key = keys->items[i];
list_append(node->suffixes, next_node);