summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7b0fee)
raw | patch | inline | side by side (parent: e7b0fee)
author | octo <octo> | |
Sun, 19 Feb 2006 09:33:58 +0000 (09:33 +0000) | ||
committer | octo <octo> | |
Sun, 19 Feb 2006 09:33:58 +0000 (09:33 +0000) |
src/battery.c | patch | blob | history |
diff --git a/src/battery.c b/src/battery.c
index 6c7e2b50d6d17b4e6e77be41d71fc04ff24d911b..ab5a042465cca4c5c45d91cc48bac2755a4c90a9 100644 (file)
--- a/src/battery.c
+++ b/src/battery.c
if (numfields < 3)
continue;
- if ((strcmp (fields[0], "present"))
- && (strcmp (fields[1], "rate:")))
+ if ((strcmp (fields[0], "present") == 0)
+ && (strcmp (fields[1], "rate:") == 0))
valptr = ¤t;
- else if ((strcmp (fields[0], "remaining"))
- && (strcmp (fields[1], "capacity:")))
+ else if ((strcmp (fields[0], "remaining") == 0)
+ && (strcmp (fields[1], "capacity:") == 0))
valptr = &charge;
- else if ((strcmp (fields[0], "present"))
- && (strcmp (fields[1], "voltage:")))
+ else if ((strcmp (fields[0], "present") == 0)
+ && (strcmp (fields[1], "voltage:") == 0))
valptr = &voltage;
else
valptr = NULL;
- if ((strcmp (fields[0], "charging"))
- && (strcmp (fields[1], "state:")))
+ if ((strcmp (fields[0], "charging") == 0)
+ && (strcmp (fields[1], "state:") == 0))
{
if (strcmp (fields[2], "charging"))
charging = 1;