state-manager: avoid un-needed reboot prop check
It was noted during the lg2 conversion that this path is invalid due to
the AttemptsLeft property being a uint32 so no way for it to be less
then 0
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I47b5c80fec79be384ad212e9c2e645fe64f2876e
diff --git a/host_state_manager.cpp b/host_state_manager.cpp
index 8df3840..16f2bbf 100644
--- a/host_state_manager.cpp
+++ b/host_state_manager.cpp
@@ -239,17 +239,11 @@
"BOOTCOUNT", rebootCounterParam);
return true;
}
- else if (rebootCounterParam == 0)
- {
- // Reset reboot counter and go to quiesce state
- info("Auto reboot enabled but HOST BOOTCOUNT already set to 0");
- attemptsLeft(BOOT_COUNT_MAX_ALLOWED);
- return false;
- }
else
{
- info(
- "Auto reboot enabled but HOST BOOTCOUNT has an invalid value");
+ // We are at 0 so reset reboot counter and go to quiesce state
+ info("Auto reboot enabled but HOST BOOTCOUNT already set to 0");
+ attemptsLeft(BOOT_COUNT_MAX_ALLOWED);
return false;
}
}