diff options
| author | Thomas Schmucker <ts@its1.de> | 2020-10-25 13:50:34 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2020-10-25 13:50:34 +0100 |
| commit | b0749a900f214f11d89a34bd605b66f1b0ed1d19 (patch) | |
| tree | 51bea40782975c6d79acc6838d3d552518b442fd /queue.c | |
| parent | afcdab8a2d1c76d7631693531dc07ab5578bf24c (diff) | |
| download | data-structures-b0749a900f214f11d89a34bd605b66f1b0ed1d19.tar.gz data-structures-b0749a900f214f11d89a34bd605b66f1b0ed1d19.tar.bz2 data-structures-b0749a900f214f11d89a34bd605b66f1b0ed1d19.zip | |
fix: neue Klammerung
Diffstat (limited to 'queue.c')
| -rw-r--r-- | queue.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -43,8 +43,9 @@ queue_put(struct queue *queue, T data) | |||
| 43 | else | 43 | else |
| 44 | tmp->next = queue->tail; | 44 | tmp->next = queue->tail; |
| 45 | } | 45 | } |
| 46 | else | 46 | else { |
| 47 | ERROR("out of memory"); | 47 | ERROR("out of memory"); |
| 48 | } | ||
| 48 | } | 49 | } |
| 49 | /* -->8-- */ | 50 | /* -->8-- */ |
| 50 | 51 | ||
| @@ -96,8 +97,9 @@ main() | |||
| 96 | 97 | ||
| 97 | queue_init(queue); | 98 | queue_init(queue); |
| 98 | 99 | ||
| 99 | for ( int i = 0; i != 10; ++i ) | 100 | for ( int i = 0; i != 10; ++i ) { |
| 100 | queue_put(queue, i); | 101 | queue_put(queue, i); |
| 102 | } | ||
| 101 | 103 | ||
| 102 | while ( !queue_empty(queue) ) { | 104 | while ( !queue_empty(queue) ) { |
| 103 | int i; | 105 | int i; |
