diff options
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; |
