From: Michael Tremer Date: Fri, 23 Apr 2021 14:13:57 +0000 (+0000) Subject: repo: Correctly set errno on invalid call X-Git-Tag: 0.9.28~1285^2~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e04b81d02588ac4ade46b874450cfc454dffef30;p=pakfire.git repo: Correctly set errno on invalid call Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/repo.c b/src/libpakfire/repo.c index 16c759a5f..eaa2a60ae 100644 --- a/src/libpakfire/repo.c +++ b/src/libpakfire/repo.c @@ -836,8 +836,10 @@ PAKFIRE_EXPORT int pakfire_repo_scan(PakfireRepo repo, int flags) { struct pakfire_progressbar* progressbar = NULL; char* path = pakfire_repo_get_path(repo); - if (!path) - return EINVAL; + if (!path) { + errno = EINVAL; + return 1; + } PakfireFilelist filelist; int r = pakfire_filelist_create(&filelist, repo->pakfire);