aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/init_msm8916.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/init/init_msm8916.cpp b/init/init_msm8916.cpp
index a84ac02..b14fdf9 100644
--- a/init/init_msm8916.cpp
+++ b/init/init_msm8916.cpp
@@ -72,9 +72,7 @@ static void init_alarm_boot_properties()
{
char const *alarm_file = "/proc/sys/kernel/boot_reason";
char buf[64];
- char tmp[PROP_VALUE_MAX];
-
- property_get("ro.boot.alarmboot", tmp);
+ std::string tmp = property_get("ro.boot.alarmboot");
if (read_file2(alarm_file, buf, sizeof(buf))) {
/*
@@ -92,7 +90,7 @@ static void init_alarm_boot_properties()
* 7 -> CBLPWR_N pin toggled (for external power supply)
* 8 -> KPDPWR_N pin toggled (power key pressed)
*/
- if (buf[0] == '3' || !strcmp(tmp, "true"))
+ if (buf[0] == '3' || tmp == "true")
property_set("ro.alarm_boot", "true");
else
property_set("ro.alarm_boot", "false");