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 /tree.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 'tree.c')
| -rw-r--r-- | tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -340,7 +340,7 @@ stack_push(struct stack *stack, struct tree_node *data) | |||
| 340 | { | 340 | { |
| 341 | struct stack_item *new_item; | 341 | struct stack_item *new_item; |
| 342 | 342 | ||
| 343 | if ( (new_item = malloc(sizeof(*new_item))) ) { | 343 | if ( (new_item = malloc(sizeof *new_item)) ) { |
| 344 | new_item->data = data; | 344 | new_item->data = data; |
| 345 | new_item->next = stack->head; | 345 | new_item->next = stack->head; |
| 346 | stack->head = new_item; | 346 | stack->head = new_item; |
| @@ -426,7 +426,7 @@ queue_put(struct queue *queue, struct tree_node *data) | |||
| 426 | { | 426 | { |
| 427 | struct queue_item *new_item; | 427 | struct queue_item *new_item; |
| 428 | 428 | ||
| 429 | if ( (new_item = malloc(sizeof(*new_item))) ) { | 429 | if ( (new_item = malloc(sizeof *new_item)) ) { |
| 430 | struct queue_item *tail; | 430 | struct queue_item *tail; |
| 431 | 431 | ||
| 432 | tail = queue->tail; | 432 | tail = queue->tail; |
