From e021542a3270c05d42d1c9b0bca2f0f183344003 Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Tue, 8 Mar 2022 11:44:56 +0900 Subject: [PATCH] battery: suppress config parse error Do not consider encounter of a section that we are not intersted in as an error, because several new sections have been added recently. Change-Id: I9d3f3d6a5dd6e14ca0478ed6f661e39a7519cd46 Signed-off-by: Youngjae Cho --- src/battery/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/battery/config.c b/src/battery/config.c index 7c5ca10..1595040 100644 --- a/src/battery/config.c +++ b/src/battery/config.c @@ -40,13 +40,13 @@ static int load_config(struct parse_result *result, void *user_data) char *name; char *value; - _D("Load config. section=%s name=%s value=%s", result->section, result->name, result->value); - if (!info) return -EINVAL; if (!MATCH(result->section, "BatteryLevelThreshold")) - return -EINVAL; + return 0; + + _D("Load config. section=%s name=%s value=%s", result->section, result->name, result->value); name = result->name; value = result->value; -- 2.7.4