Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
// Return existing repositories with the same name
struct pakfire_repo* rep = pakfire_get_repo(pakfire, name);
- if (rep) {
- *repo = rep;
- return 0;
- }
+ if (rep)
+ goto SUCCESS;
// Create a new one
rep = calloc(1, sizeof(*rep));
// Skip remaining initialization for "internal" repositories
if (pakfire_repo_is_internal(rep))
- return 0;
+ goto SUCCESS;
// Make path to mirrorlist
r = pakfire_make_cache_path(pakfire, rep->appdata->mirrorlist,
goto ERROR;
}
+SUCCESS:
*repo = rep;
return 0;