From de010b0b2e50cf0b3837ce350b116bc92605f67a Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 16 Mar 2022 22:32:23 +0900 Subject: strv: make iterator in STRV_FOREACH() declaread in the loop This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS() --- src/sleep/sleep.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/sleep/sleep.c') diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 7064f3a905..f108529bbd 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -85,7 +85,6 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca static int write_mode(char **modes) { int r = 0; - char **mode; STRV_FOREACH(mode, modes) { int k; @@ -103,7 +102,6 @@ static int write_mode(char **modes) { } static int write_state(FILE **f, char **states) { - char **state; int r = 0; assert(f); -- cgit v1.2.3