Check return in driver program

This commit is contained in:
Imbus 2024-07-02 06:37:58 +02:00
parent 6022bdee92
commit de2465de83

View file

@ -16,7 +16,9 @@ main(void)
int arr[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
int ok = WriteOk; // Assume we can write
ok = rb_push_many(&rb, arr, memcpy, 8);
if(rb_push_many(&rb, arr, memcpy, 8) != WriteOk) {
printf("Failed to write data to buffer...\n");
}
int d;
while(rb_pop_front(&rb, &d, memcpy) == ReadOk) {