[PATCH 5/9] delta: check if a config file is set before parsing

1 view
Skip to first unread message

Stefano Babic

unread,
Feb 11, 2026, 8:27:48 AM (4 days ago) Feb 11
to swup...@googlegroups.com, Stefano Babic
Check if a configuration file is passed before calling
swupdate_cfg_read_file(). The function checks itself for the file and
skip if none is passed, but an ERROR is logged.

Signed-off-by: Stefano Babic <stefan...@swupdate.org>
---
handlers/delta_downloader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/handlers/delta_downloader.c b/handlers/delta_downloader.c
index 248ebbb2..890cd43e 100644
--- a/handlers/delta_downloader.c
+++ b/handlers/delta_downloader.c
@@ -203,7 +203,7 @@ int start_delta_downloader(const char __attribute__ ((__unused__)) *fname,
swupdate_cfg_handle handle;
swupdate_cfg_init(&handle);

- if (swupdate_cfg_read_file(&handle, fname) == 0) {
+ if (fname && swupdate_cfg_read_file(&handle, fname) == 0) {
read_module_settings(&handle, "delta", channel_settings, &channel_data);
}

--
2.43.0

Reply all
Reply to author
Forward
0 new messages