Driver code simplifying
This commit is contained in:
parent
06b949bed4
commit
85071d3130
1 changed files with 9 additions and 6 deletions
15
driver.c
15
driver.c
|
@ -21,15 +21,18 @@ main(void)
|
|||
}
|
||||
|
||||
int d;
|
||||
while(rb_pop_front(&rb, &d, memcpy) == ReadOk) {
|
||||
printf("Data: %d\n", d);
|
||||
}
|
||||
printf("Data: [");
|
||||
while(rb_pop_front(&rb, &d, memcpy) == ReadOk)
|
||||
printf("%d,", d);
|
||||
printf("\b]\n");
|
||||
|
||||
// Test wrap around
|
||||
rb_push_many(&rb, arr, memcpy, 10);
|
||||
while(rb_pop_front(&rb, &d, memcpy) == ReadOk) {
|
||||
printf("Data: %d\n", d);
|
||||
}
|
||||
|
||||
printf("Data: [");
|
||||
while(rb_pop_front(&rb, &d, memcpy) == ReadOk)
|
||||
printf("%d,", d);
|
||||
printf("\b]\n");
|
||||
|
||||
// Test clear
|
||||
rb_clear(&rb);
|
||||
|
|
Loading…
Reference in a new issue