diff --git a/services/src/init_reboot.c b/services/src/init_reboot.c index cc2aab36163ba9e971dac186fb0928c5e65c3104..76eb0f9cad2b014d56c708a02818dee336bd666b 100644 --- a/services/src/init_reboot.c +++ b/services/src/init_reboot.c @@ -148,13 +148,13 @@ static int UpdateUpdaterStatus(const char *valueData) return -1; } ret = RBMiscWriteUpdaterMessage(miscFile, &msg); - if (true != ret) { + if (ret != true) { INIT_LOGE("RBMiscWriteUpdaterMessage error"); return -1; } } else if (strlen(valueData) == strlen("updater") && strncmp(valueData, "updater", strlen("updater")) == 0) { ret = RBMiscWriteUpdaterMessage(miscFile, &msg); - if (true != ret) { + if (ret != true) { INIT_LOGE("RBMiscWriteUpdaterMessage error"); return -1; } @@ -205,10 +205,10 @@ void DoReboot(const char *value) INIT_LOGE("DoReboot reboot value = %s, must started with reboot ,error.", value); return; } - if (valueData != NULL - && strncmp(valueData, "shutdown", strlen("shutdown")) != 0 - && strncmp(valueData, "updater:", strlen("updater:")) != 0 - && strncmp(valueData, "updater", strlen("updater")) != 0) { + if (valueData != NULL && + strncmp(valueData, "shutdown", strlen("shutdown")) != 0 && + strncmp(valueData, "updater:", strlen("updater:")) != 0 && + strncmp(valueData, "updater", strlen("updater")) != 0) { INIT_LOGE("DoReboot value = %s, parameters error.", value); return; }