Driver code simplifying

This commit is contained in:
Imbus 2024-07-02 06:49:49 +02:00
parent 06b949bed4
commit 85071d3130

View file

@ -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);