From: Michael Tremer Date: Thu, 30 Jan 2025 09:07:33 +0000 (+0000) Subject: repo: Refactor identity function X-Git-Tag: 0.9.30~281 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6186df011bcb1a43927552213841efd7e4ab7e27;p=pakfire.git repo: Refactor identity function We could in theory have two repositories with the same name. Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/repo.c b/src/pakfire/repo.c index 9a1bfe4a..9d481d89 100644 --- a/src/pakfire/repo.c +++ b/src/pakfire/repo.c @@ -910,10 +910,7 @@ Repodata* pakfire_repo_get_repodata(struct pakfire_repo* repo) { } int pakfire_repo_identical(struct pakfire_repo* repo1, struct pakfire_repo* repo2) { - Repo* r1 = repo1->repo; - Repo* r2 = repo2->repo; - - return strcmp(r1->name, r2->name); + return (repo1->repo == repo2->repo); } int pakfire_repo_cmp(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {