Skip to content

Commit

Permalink
Merge pull request #584 from f4exb/master
Browse files Browse the repository at this point in the history
Fixed declaration of 'buf' hides previous local declaration
  • Loading branch information
dNechita authored Aug 24, 2020
2 parents b23a03b + e2d3e74 commit 85c84d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/iio_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,12 @@ struct iio_context * handle_common_opts(char * name, int argc,
ctx = iio_create_default_context();

if (!ctx && !do_scan && !detect_context) {
char buf[1024];
iio_strerror(errno, buf, sizeof(buf));
char err_str[1024];
iio_strerror(errno, err_str, sizeof(err_str));
if (arg)
fprintf(stderr, "Unable to create IIO context %s: %s\n", arg, buf);
fprintf(stderr, "Unable to create IIO context %s: %s\n", arg, err_str);
else
fprintf(stderr, "Unable to create Local IIO context : %s\n", buf);
fprintf(stderr, "Unable to create Local IIO context : %s\n", err_str);
}

if (ctx && timeout >= 0) {
Expand Down

0 comments on commit 85c84d0

Please sign in to comment.