diff options
author | clsr <clsr@clsr.net> | 2022-02-17 20:04:01 +0000 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2022-02-17 20:04:01 +0000 |
commit | 1f63241a82e0d8fce205dfbee3350f501a68b830 (patch) | |
tree | de2ea095c93842582d0bfdc6f1241fb991307f46 | |
parent | 15f5a66646c6c4f9913aa98a64009f0958b0d935 (diff) | |
download | dwmclock-master.tar.gz dwmclock-master.zip |
-rw-r--r-- | dwmclock.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,7 +142,7 @@ int main(void) #ifdef POWER_NOW pcur = getnum(POWER_NOW); #elif defined(CURRENT_NOW) && defined(VOLTAGE_NOW) /* POWER_NOW */ - pcur = getnum(CURRENT_NOW) * getnum(VOLTAGE_NOW) / 1000000; + pcur = (long long)getnum(CURRENT_NOW) * (long long)getnum(VOLTAGE_NOW) / 1000000; #else /* POWER_NOW */ #error "Either POWER_NOW or CURRENT_NOW and VOLTAGE_NOW must be defined" #endif /* POWER_NOW*/ @@ -171,7 +171,7 @@ int main(void) if (pa < 0 || pb < 0) { snprintf(power, 6, "NOPOW"); } else if (pa < 0 || pa > 9999 || pb < 0 || pb > 9) { - snprintf(power, 6, "?????W"); + snprintf(power, 6, "????W"); } else if (pa > 99) { snprintf(power, 6, "%4lldW", pa); } else { |