]> git.ipfire.org Git - pakfire.git/commitdiff
repo: baseurl is a pointer
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 13 Mar 2021 17:48:16 +0000 (17:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 13 Mar 2021 17:48:16 +0000 (17:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/repo.c

index c388972b31aca48685a5b5d6971d9730ba69c40d..945b1952ed96486806a07ca4669d29ab972be808 100644 (file)
@@ -84,20 +84,18 @@ Id pakfire_repo_add_solvable(PakfireRepo repo) {
 }
 
 static struct pakfire_downloader* pakfire_repo_downloader(PakfireRepo repo) {
-       const char* mirrorlist = repo->appdata->mirrorlist;
-
        if (!repo->downloader) {
                int r = pakfire_downloader_create(&repo->downloader, repo->pakfire);
                if (r)
                        return NULL;
 
                // Set baseurl
-               if (*repo->appdata->baseurl)
+               if (repo->appdata->baseurl)
                        pakfire_downloader_set_baseurl(repo->downloader, repo->appdata->baseurl);
 
                // Load all mirrors (if the mirrorlist exists)
-               if (*mirrorlist && pakfire_path_exists(mirrorlist)) {
-                       r = pakfire_downloader_read_mirrorlist(repo->downloader, mirrorlist);
+               if (repo->appdata->mirrorlist && pakfire_path_exists(repo->appdata->mirrorlist)) {
+                       r = pakfire_downloader_read_mirrorlist(repo->downloader, repo->appdata->mirrorlist);
                        if (r)
                                return NULL;
                }