From 098b6e013d9f46102cc016277ea959a42de66217 Mon Sep 17 00:00:00 2001 From: octo Date: Sun, 19 Feb 2006 09:46:07 +0000 Subject: [PATCH] Merged changed on `battery.c' from `trunk' to `tags/collectd-3.7.2' --- src/battery.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/battery.c b/src/battery.c index 6c7e2b50..d467ecc8 100644 --- a/src/battery.c +++ b/src/battery.c @@ -285,22 +285,22 @@ static void battery_read (void) 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")) + if (strcmp (fields[2], "charging") == 0) charging = 1; else charging = 0; -- 2.30.2