Skip to content

Commit d957407

Browse files
cristi-iacobcommodo
authored andcommitted
tests: iio_writedev: print error regardless of 'app_running'
We should print an error message regardless of whether app_running is true/false. Otherwise we risk hiding errors. Signed-off-by: Cristi Iacob <[email protected]>
1 parent db9e246 commit d957407

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/iio_writedev.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,9 @@ int main(int argc, char **argv)
472472

473473
int ret = iio_buffer_push(buffer);
474474
if (ret < 0) {
475-
if (app_running) {
476-
char buf[256];
477-
iio_strerror(-ret, buf, sizeof(buf));
478-
fprintf(stderr, "Unable to push buffer: %s\n", buf);
479-
}
475+
char buf[256];
476+
iio_strerror(-ret, buf, sizeof(buf));
477+
fprintf(stderr, "Unable to push buffer: %s\n", buf);
480478
break;
481479
}
482480

0 commit comments

Comments
 (0)