Skip to content

Commit

Permalink
Address feedback by brndnmtthws
Browse files Browse the repository at this point in the history
  • Loading branch information
fernape authored and brndnmtthws committed Jun 15, 2024
1 parent 942ce12 commit 6cf51b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/freebsd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -455,17 +455,17 @@ static void get_battery_stats(int *battime, int *batcapacity, int *batstate,

if (battery_present) {
if (battime && GETSYSCTL("hw.acpi.battery.time", *battime)) {
fprintf(stderr, "Cannot read sysctl \"hw.acpi.battery.time\"\n");
NORM_ERR("Cannot read sysctl \"hw.acpi.battery.time\"");
}
if (batcapacity && GETSYSCTL("hw.acpi.battery.life", *batcapacity)) {
fprintf(stderr, "Cannot read sysctl \"hw.acpi.battery.life\"\n");
NORM_ERR("Cannot read sysctl \"hw.acpi.battery.life\"");
}
if (batstate && GETSYSCTL("hw.acpi.battery.state", *batstate)) {
fprintf(stderr, "Cannot read sysctl \"hw.acpi.battery.state\"\n");
NORM_ERR("Cannot read sysctl \"hw.acpi.battery.state\"");
}
}
if (ac_present && ac && GETSYSCTL("hw.acpi.acline", *ac)) {
fprintf(stderr, "Cannot read sysctl \"hw.acpi.acline\"\n");
NORM_ERR("Cannot read sysctl \"hw.acpi.acline\"");
}
}

Expand Down

0 comments on commit 6cf51b2

Please sign in to comment.