Define FOREACH_DIRENT through FOREACH_DIRENT_ALL

As in the previous commit, 'de' is used as the iterator variable name.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-12-15 22:50:00 +01:00
parent c7f0d9e5ac
commit af3b864d76
31 changed files with 18 additions and 69 deletions
-1
View File
@@ -118,7 +118,6 @@ void in_initrd_force(bool value) {
int on_ac_power(void) {
bool found_offline = false, found_online = false;
_cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r;
d = opendir("/sys/class/power_supply");