[haiku-commits] r41321 - haiku/trunk/src/apps/powerstatus

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 5 May 2011 20:35:43 +0200 (CEST)

Author: kallisti5
Date: 2011-05-05 20:35:43 +0200 (Thu, 05 May 2011)
New Revision: 41321
Changeset: https://dev.haiku-os.org/changeset/41321

Modified:
   haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp
Log:
small logic correction, string compare reversed for empty battery slot test

Modified: haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp
===================================================================
--- haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp     2011-05-05 
17:29:37 UTC (rev 41320)
+++ haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp     2011-05-05 
18:35:43 UTC (rev 41321)
@@ -137,10 +137,10 @@
        else if (fBatteryInfo.state & BATTERY_DISCHARGING)
                fontString->string = B_TRANSLATE("Battery discharging");
        else if (fBatteryInfo.state & BATTERY_CRITICAL_STATE
-               && strcmp(fBatteryExtendedInfo.model_number, "")
-               && strcmp(fBatteryExtendedInfo.serial_number, "")
-               && strcmp(fBatteryExtendedInfo.type, "")
-               && strcmp(fBatteryExtendedInfo.oem_info, ""))
+               && !strcmp(fBatteryExtendedInfo.model_number, "")
+               && !strcmp(fBatteryExtendedInfo.serial_number, "")
+               && !strcmp(fBatteryExtendedInfo.type, "")
+               && !strcmp(fBatteryExtendedInfo.oem_info, ""))
                fontString->string = B_TRANSLATE("Empty battery slot");
        else if (fBatteryInfo.state & BATTERY_CRITICAL_STATE)
                fontString->string = B_TRANSLATE("Damaged battery");


Other related posts: