diff options
| author | Thomas Schmucker <ts@its1.de> | 2020-08-06 08:29:00 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2020-08-06 08:29:00 +0200 |
| commit | 06fc363c69a880f1965a9d263d23d9af200f5a9d (patch) | |
| tree | 9fcbaef48d86fc800fdb1a92bbdaccf704c51708 /tree.c | |
| parent | 9daf9039c0356e68a3a7bb12f71901fa02d86860 (diff) | |
| download | data-structures-06fc363c69a880f1965a9d263d23d9af200f5a9d.tar.gz data-structures-06fc363c69a880f1965a9d263d23d9af200f5a9d.tar.bz2 data-structures-06fc363c69a880f1965a9d263d23d9af200f5a9d.zip | |
cleanup code
Diffstat (limited to 'tree.c')
| -rw-r--r-- | tree.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -288,8 +288,11 @@ static bool | |||
| 288 | stack_pop(struct stack *stack, struct tree_node **data) | 288 | stack_pop(struct stack *stack, struct tree_node **data) |
| 289 | { | 289 | { |
| 290 | if ( stack->head != NULL ) { | 290 | if ( stack->head != NULL ) { |
| 291 | struct stack_item *next = stack->head->next; | 291 | struct stack_item *next; |
| 292 | *data = stack->head->data; | 292 | |
| 293 | next = stack->head->next; | ||
| 294 | *data = stack->head->data; | ||
| 295 | |||
| 293 | free(stack->head); | 296 | free(stack->head); |
| 294 | stack->head = next; | 297 | stack->head = next; |
| 295 | 298 | ||
