summaryrefslogtreecommitdiff
path: root/src/components/config_profile/src/profile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/config_profile/src/profile.cc')
-rw-r--r--src/components/config_profile/src/profile.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index a86d09da94..d9204acf90 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -1739,8 +1739,7 @@ void Profile::UpdateValues() {
help_prompt_.clear();
std::string help_prompt_value;
if (ReadValue(&help_prompt_value, kGlobalPropertiesSection, kHelpPromptKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(help_prompt_value.c_str()), ",");
+ char* str = strtok(const_cast<char*>(help_prompt_value.c_str()), ",");
while (str != NULL) {
// Default prompt should have delimiter included for each item
const std::string prompt_item = std::string(str) + tts_delimiter_;
@@ -1759,8 +1758,7 @@ void Profile::UpdateValues() {
std::string timeout_prompt_value;
if (ReadValue(
&timeout_prompt_value, kGlobalPropertiesSection, kTimeoutPromptKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(timeout_prompt_value.c_str()), ",");
+ char* str = strtok(const_cast<char*>(timeout_prompt_value.c_str()), ",");
while (str != NULL) {
// Default prompt should have delimiter included for each item
const std::string prompt_item = std::string(str) + tts_delimiter_;
@@ -1784,8 +1782,7 @@ void Profile::UpdateValues() {
vr_commands_.clear();
std::string vr_help_command_value;
if (ReadValue(&vr_help_command_value, kVrCommandsSection, kHelpCommandKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(vr_help_command_value.c_str()), ",");
+ char* str = strtok(const_cast<char*>(vr_help_command_value.c_str()), ",");
while (str != NULL) {
const std::string vr_item = str;
vr_commands_.push_back(vr_item);
@@ -1867,8 +1864,8 @@ void Profile::UpdateValues() {
"",
kMainSection,
kSupportedDiagModesKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(supported_diag_modes_value.c_str()), ",");
+ char* str =
+ strtok(const_cast<char*>(supported_diag_modes_value.c_str()), ",");
while (str != NULL) {
errno = 0;
uint32_t user_value = strtol(str, NULL, 16);