Check return in driver program
This commit is contained in:
parent
6022bdee92
commit
de2465de83
1 changed files with 3 additions and 1 deletions
4
driver.c
4
driver.c
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue