peregrine: init: Kill ISMATCH

* Let's use c++ std::string

Change-Id: I09d4bf24db7d8ad243bf6ab50a15a677c54858af
This commit is contained in:
Luca Stefani 2016-08-26 13:52:48 +02:00 committed by Gabriele M
parent f82182c34b
commit b300fb8292
1 changed files with 5 additions and 7 deletions

View File

@ -35,20 +35,18 @@
#include "log.h" #include "log.h"
#include "util.h" #include "util.h"
#define ISMATCH(a,b) (!strncmp(a,b,PROP_VALUE_MAX))
void gsm_properties(); void gsm_properties();
void cdma_properties(const char *cdma_sub); void cdma_properties(const char *cdma_sub);
void vendor_load_properties() void vendor_load_properties()
{ {
std::string platform = property_get("ro.board.platform"); std::string platform = property_get("ro.board.platform");
if (!ISMATCH(platform.c_str(), ANDROID_TARGET)) if (platform != ANDROID_TARGET)
return; return;
std::string radio = property_get("ro.boot.radio"); std::string radio = property_get("ro.boot.radio");
if (ISMATCH(radio.c_str(), "0x1")) { if (radio == "0x1") {
/* xt1045*/ /* xt1045*/
gsm_properties(); gsm_properties();
property_set("ro.product.device", "peregrine"); property_set("ro.product.device", "peregrine");
@ -59,7 +57,7 @@ void vendor_load_properties()
property_set("ro.mot.build.customerid", "retus"); property_set("ro.mot.build.customerid", "retus");
property_set("persist.radio.multisim.config", ""); property_set("persist.radio.multisim.config", "");
} else if (ISMATCH(radio.c_str(), "0x3")) { } else if (radio == "0x3") {
/* xt1039 */ /* xt1039 */
gsm_properties(); gsm_properties();
property_set("ro.product.device", "peregrine"); property_set("ro.product.device", "peregrine");
@ -70,7 +68,7 @@ void vendor_load_properties()
property_set("ro.mot.build.customerid", "reteu"); property_set("ro.mot.build.customerid", "reteu");
property_set("persist.radio.multisim.config", ""); property_set("persist.radio.multisim.config", "");
} else if (ISMATCH(radio.c_str(), "0x5")) { } else if (radio == "0x5") {
/*xt1042 */ /*xt1042 */
cdma_properties("0"); cdma_properties("0");
property_set("ro.product.device", "peregrine"); property_set("ro.product.device", "peregrine");
@ -95,7 +93,7 @@ void vendor_load_properties()
property_set("ro.cdma.home.operator.numeric", "311220"); property_set("ro.cdma.home.operator.numeric", "311220");
property_set("telephony.sms.pseudo_multipart", "1"); property_set("telephony.sms.pseudo_multipart", "1");
} else if (ISMATCH(radio.c_str(), "0x7")) { } else if (radio == "0x7") {
/* xt1040 */ /* xt1040 */
gsm_properties(); gsm_properties();
property_set("ro.product.device", "peregrine"); property_set("ro.product.device", "peregrine");