summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-11-04 20:08:08 +0100
committerErich Eckner <git@eckner.net>2019-11-04 20:08:08 +0100
commit6af672d8d338e290e65d557231362f34e0e4e8f5 (patch)
tree274e03aea22c6d0d91a026c6a8aad3e60ed28e1b
parente6860732861a69ddd20f669dc8f2594dccf6218b (diff)
downloadanzeige-6af672d8d338e290e65d557231362f34e0e4e8f5.tar.xz
input_gadgets.c: fix sign, optimize TP-warning
-rw-r--r--input_gadgets.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/input_gadgets.c b/input_gadgets.c
index 6fed43f..5c7376e 100644
--- a/input_gadgets.c
+++ b/input_gadgets.c
@@ -1041,10 +1041,10 @@ char *gadgets_retrieve_humidity(char *output, int max_len, double fh_temperature
humidity *= maximale_luftfeuchte(temperature);
fh_humidity *= maximale_luftfeuchte(fh_temperature);
- if ((output + max_len - ende > 0) && (temperature <= taupunkt(fh_humidity)-2))
- ende += snprintf(ende, max_len, "!TP(a) %.1f K; ", taupunkt(fh_humidity) - temperature);
- if ((output + max_len - ende > 0) && (temperature <= taupunkt(humidity)-2))
- ende += snprintf(ende, max_len, "!TP(i) %.1f K; ", taupunkt(humidity) - temperature);
+ if ((output + max_len - ende > 0) && (temperature <= taupunkt(fh_humidity)+2))
+ ende += snprintf(ende, max_len, "!TPa %.1f K; ", taupunkt(fh_humidity) - temperature);
+ if ((output + max_len - ende > 0) && (temperature <= taupunkt(humidity)+2))
+ ende += snprintf(ende, max_len, "!TPi %.1f K; ", taupunkt(humidity) - temperature);
if (output + max_len - ende > 0)
ende += snprintf(ende, max_len, "%.0f %%", humidity * 100 / fh_humidity);
free(chunk.memory);