]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Refactor identity function
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 09:07:33 +0000 (09:07 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 09:09:00 +0000 (09:09 +0000)
We could in theory have two repositories with the same name.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/repo.c

index 9a1bfe4a214360633d464dc58f3b054d36dd3a71..9d481d89a8c8c37217765b992124a68a05df576e 100644 (file)
@@ -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) {