From 0310960571248a8df4604c6b890a135d8e551286 Mon Sep 17 00:00:00 2001 From: Dmitry Tsarevich Date: Thu, 7 May 2020 14:09:52 +0300 Subject: [PATCH] client: Use explicit battery state code with same value (0) --- client/hostinfo_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp index d1554734c5..d1369781ed 100644 --- a/client/hostinfo_win.cpp +++ b/client/hostinfo_win.cpp @@ -1544,7 +1544,7 @@ int HOST_INFO::get_host_battery_state() { SYSTEM_POWER_STATUS Status; ZeroMemory(&Status, sizeof(SYSTEM_POWER_STATUS)); if (!GetSystemPowerStatus(&Status)) { - return false; + return BATTERY_STATE_UNKNOWN; } // Sometimes the system reports the ACLineStatus as an