]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Initialize return value on scan just in case we find no files
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Jan 2025 16:50:52 +0000 (16:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Jan 2025 16:50:52 +0000 (16:50 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/repo.c

index 3a6b4b602b28acb6292fdc20fad81bda5d5afe8d..aeda4cf0b8e9122d922fffb162e7b153fefe5b10 100644 (file)
@@ -1549,7 +1549,7 @@ static int __pakfire_repo_scan(struct pakfire_repo* repo,
                struct pakfire_repo_scan_ctx* scan_ctx, pakfire_repo_scan_callback callback) {
        FTSENT* entry = NULL;
        FTS* fts = NULL;
-       int r;
+       int r = 0;
 
        // Fetch the repository path
        const char* path = pakfire_repo_get_path(repo);