From: Michael Tremer Date: Wed, 26 Mar 2025 15:46:12 +0000 (+0000) Subject: repo: Use our own string comparison function X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0aa5cb0892551b417c6ea7a59ee3dcb70bffd4b;p=pakfire.git repo: Use our own string comparison function Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/repo.c b/src/pakfire/repo.c index 3dee18e0..c0b18fb2 100644 --- a/src/pakfire/repo.c +++ b/src/pakfire/repo.c @@ -183,7 +183,7 @@ int pakfire_repo_name_equals(struct pakfire_repo* repo, const char* name) { if (!n) return 0; - return strcmp(n, name) == 0; + return pakfire_string_equals(n, name); } char* pakfire_repo_url_replace(struct pakfire_repo* repo, const char* url) { @@ -223,7 +223,7 @@ char* pakfire_repo_url_replace(struct pakfire_repo* repo, const char* url) { } #ifdef ENABLE_DEBUG - if (strcmp(url, buffer) != 0) { + if (!pakfire_string_equals(url, buffer)) { DEBUG(repo->ctx, "Repository URL updated:"); DEBUG(repo->ctx, " From: %s\n", url); DEBUG(repo->ctx, " To : %s\n", buffer); @@ -1573,7 +1573,7 @@ int pakfire_repo_cmp(struct pakfire_repo* repo1, struct pakfire_repo* repo2) { else if (r1->priority < r2->priority) return -1; - return strcmp(r1->name, r2->name); + return pakfire_string_equals(r1->name, r2->name); } int pakfire_repo_count(struct pakfire_repo* repo) {