summaryrefslogtreecommitdiff
path: root/src/shared/dlt_config_file_parser.c
diff options
context:
space:
mode:
authorVo Trung Chi <Chi.VoTrung@vn.bosch.com>2019-05-06 17:31:15 +0700
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2019-09-13 08:49:53 +0900
commitee7943c0fd408739b0c6313c679c3c9a2c3a23a0 (patch)
treea2fb6f34b8158a1800639344c51640a922e09c2a /src/shared/dlt_config_file_parser.c
parenta3be75bc16e84b37ba9fbe9b6795262ebb32e63c (diff)
downloadDLT-daemon-ee7943c0fd408739b0c6313c679c3c9a2c3a23a0.tar.gz
parser: Change maximum number of config section
This commit includes improvement of related code. Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
Diffstat (limited to 'src/shared/dlt_config_file_parser.c')
-rw-r--r--src/shared/dlt_config_file_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/dlt_config_file_parser.c b/src/shared/dlt_config_file_parser.c
index bf6dfb4..e701341 100644
--- a/src/shared/dlt_config_file_parser.c
+++ b/src/shared/dlt_config_file_parser.c
@@ -123,7 +123,7 @@ static int dlt_config_file_set_section(DltConfigFile *file, char *name)
int section = file->num_sections;
/* check if adding another section would exceed max number of sections */
- if (section + 1 >= DLT_CONFIG_FILE_SECTIONS_MAX) {
+ if (section >= DLT_CONFIG_FILE_SECTIONS_MAX) {
dlt_log(LOG_WARNING, "Cannot store more sections\n");
return -1; /* reached max number of sections */
}
@@ -538,6 +538,6 @@ int dlt_config_file_get_value(const DltConfigFile *file,
}
}
- dlt_log(LOG_WARNING, "Entry does not exist in section \n");
+ dlt_vlog(LOG_WARNING, "Entry does not exist in section: %s\n", key);
return -1;
}