From 2a866aacdece45d61ba2672158e0dab9bf050d1a Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Fri, 24 Feb 2023 23:35:49 +0300 Subject: [PATCH] test: fix variable shadowing --- src/driver-test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/driver-test.c b/src/driver-test.c index d9c180c3..440acc8b 100644 --- a/src/driver-test.c +++ b/src/driver-test.c @@ -159,8 +159,10 @@ test_read_profile(struct ratbag_profile *profile) p0 = &d->profiles[0]; r0 = &p0->resolutions[0]; - for (size_t r = 0; r < ARRAY_LENGTH(p0->report_rates); r++) { - if (p0->report_rates[r] > 0) + for (size_t report_rate_index = 0; + report_rate_index < ARRAY_LENGTH(p0->report_rates); + report_rate_index++) { + if (p0->report_rates[report_rate_index] > 0) nrates++; }