From e941f9ff5dbb6162c9310d1d6be2da5c77e666ce Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 13 May 2019 13:50:27 +0200 Subject: [PATCH] iio: Break from the loop when we've found the right channel No need to keep looping once we've found it. --- src/iio-buffer-utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/iio-buffer-utils.c b/src/iio-buffer-utils.c index 3547060..e75c544 100644 --- a/src/iio-buffer-utils.c +++ b/src/iio-buffer-utils.c @@ -588,6 +588,7 @@ process_scan_1 (char *data, *ch_scale = info->scale; *ch_present = TRUE; + break; } if (!*ch_present)