netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=3ceaad0afdf83e243e6dbf9e734d083007edf979

commit 3ceaad0afdf83e243e6dbf9e734d083007edf979
Author: Alastair Poole <nets...@gmail.com>
Date:   Sat Jul 11 18:34:49 2020 +0100

    machine: ifdef chopping and splicing functions.
    
    This stuff is bad...where did i learn to be doing such things.
---
 src/bin/system/machine/sensors.bogox | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/bin/system/machine/sensors.bogox 
b/src/bin/system/machine/sensors.bogox
index 7aa8918..49c93fa 100644
--- a/src/bin/system/machine/sensors.bogox
+++ b/src/bin/system/machine/sensors.bogox
@@ -333,8 +333,6 @@ system_power_state_get(power_t *power)
 #elif defined(__FreeBSD__) || defined(__DragonFly__)
    unsigned int value;
    size_t len;
-#elif defined(__linux__)
-   char *buf;
 #endif
 
    if (!_power_battery_count_get(power))
@@ -353,7 +351,7 @@ system_power_state_get(power_t *power)
 
    power->have_ac = value;
 #elif defined(__linux__)
-   buf = file_contents("/sys/class/power_supply/AC/online");
+   char *buf = file_contents("/sys/class/power_supply/AC/online");
    if (buf)
      {
         power->have_ac = atoi(buf);

-- 


Reply via email to