]> git.ipfire.org Git - pakfire.git/commitdiff
keys: Fix handling IDs (again)
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Jun 2023 18:45:43 +0000 (18:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Jun 2023 18:45:43 +0000 (18:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/key.c

index e3d31271ca846131c3074f43c79fee5e3394678b..489e57b216a5519e3a7159723afa8f550d902d4f 100644 (file)
@@ -84,7 +84,7 @@ struct pakfire_key_signature {
 };
 
 static int pakfire_key_id_equals(const pakfire_key_id* id1, const pakfire_key_id* id2) {
-       return *id1 == *id2;
+       return !memcmp(*id1, *id2, sizeof(*id1));
 }
 
 static int pakfire_key_create(struct pakfire_key** key, struct pakfire* pakfire,
@@ -154,7 +154,7 @@ PAKFIRE_EXPORT void pakfire_key_unref(struct pakfire_key* key) {
 }
 
 PAKFIRE_EXPORT pakfire_key_id* pakfire_key_get_id(struct pakfire_key* key) {
-       return key->id;
+       return &key->id;
 }
 
 PAKFIRE_EXPORT const char* pakfire_key_get_algo(struct pakfire_key* key) {