summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/ini/ini_config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/ini/ini_config.c b/common/ini/ini_config.c
index c28c6489e..8c54ad5cc 100644
--- a/common/ini/ini_config.c
+++ b/common/ini/ini_config.c
@@ -295,7 +295,10 @@ static int ini_to_collection(const char *filename,
case RET_SECTION:
/* Add line to the collection of lines */
if (lines) {
- error = add_int_property(*lines, NULL, key, line);
+ /* For easier search make line numbers for the sections negative.
+ * This would allow differentiating sections and attributes.
+ */
+ error = add_int_property(*lines, NULL, key, -1 * line);
if (error) {
TRACE_ERROR_NUMBER("Failed to add line to line collection", error);
fclose(file);