Make sure we exit this hole

edi-0.5
Alastair Poole 4 years ago
parent 2c2930cc60
commit 37cb378cf9
  1. 6
      src/system.c

@ -895,7 +895,11 @@ _battery_state_get(power_t *power, int *mib)
}
closedir(dir);
if (!naming) continue;
if (!naming)
{
i++;
continue;
}
snprintf(path, sizeof(path), "/sys/class/power_supply/%s/%s_full", power->battery_names[i], naming);
buf = Fcontents(path);

Loading…
Cancel
Save