From d97874240bf1401fb4c5a75017e381ddcde229ca Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Tue, 16 Aug 2016 10:44:36 -0700 Subject: [PATCH] Use C++ style std::string instead of C-style string Change-Id: I323187bca7555adada2a8a5cf2c25e30592040b1 --- btif/src/btif_config.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/btif/src/btif_config.cc b/btif/src/btif_config.cc index f10366a54..b12bd0c53 100644 --- a/btif/src/btif_config.cc +++ b/btif/src/btif_config.cc @@ -136,7 +136,7 @@ static future_t *init(void) { if (is_factory_reset()) delete_config_files(); - const char *file_source = NULL; + std::string file_source; config = btif_config_open(CONFIG_FILE_PATH); btif_config_source = ORIGINAL; @@ -160,8 +160,8 @@ static future_t *init(void) { file_source = "Empty"; } - if (file_source != NULL) - config_set_string(config, INFO_SECTION, FILE_SOURCE, file_source); + if (!file_source.empty()) + config_set_string(config, INFO_SECTION, FILE_SOURCE, file_source.c_str()); if (!config) { LOG_ERROR(LOG_TAG, "%s unable to allocate a config object.", __func__); -- 2.11.0