diff options
| author | Thomas Schmucker <ts@its1.de> | 2022-01-16 10:42:12 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2022-01-16 10:42:12 +0100 |
| commit | 85d7942c1c5c1b92add8a4dc70279e91b6f9cdaf (patch) | |
| tree | f9784621dbd6dcfd9faa8ca3194dfac826d8aa2a /rb.c | |
| parent | 2a32335f1ff91e96fd6a09819317f77d6b8bf285 (diff) | |
| parent | fb0e8a6fa561cd2a518b6a65f50e8179a19985cc (diff) | |
| download | data-structures-85d7942c1c5c1b92add8a4dc70279e91b6f9cdaf.tar.gz data-structures-85d7942c1c5c1b92add8a4dc70279e91b6f9cdaf.tar.bz2 data-structures-85d7942c1c5c1b92add8a4dc70279e91b6f9cdaf.zip | |
Merge branch 'cleanup/remove-sizeof'
Diffstat (limited to 'rb.c')
| -rw-r--r-- | rb.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -189,7 +189,7 @@ verify_property_5_helper(node n, int black_count, int *path_black_count) | |||
| 189 | rbtree | 189 | rbtree |
| 190 | rbtree_create() | 190 | rbtree_create() |
| 191 | { | 191 | { |
| 192 | rbtree t = malloc(sizeof(struct rbtree_t)); | 192 | rbtree t = malloc(sizeof *t); |
| 193 | t->root = NULL; | 193 | t->root = NULL; |
| 194 | verify_properties(t); | 194 | verify_properties(t); |
| 195 | return t; | 195 | return t; |
| @@ -198,7 +198,7 @@ rbtree_create() | |||
| 198 | node | 198 | node |
| 199 | new_node(void *key, void *value, color node_color, node left, node right) | 199 | new_node(void *key, void *value, color node_color, node left, node right) |
| 200 | { | 200 | { |
| 201 | node result = malloc(sizeof(struct rbtree_node_t)); | 201 | node result = malloc(sizeof *result); |
| 202 | result->key = key; | 202 | result->key = key; |
| 203 | result->value = value; | 203 | result->value = value; |
| 204 | result->color = node_color; | 204 | result->color = node_color; |
