]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - merge.c
Switch debian build system to dh
[onak.git] / merge.c
diff --git a/merge.c b/merge.c
index 9dcbf4d20fc3c784df361cb68e6c6a2d8ec5dac2..353a844e6de9a1d346e7f102d7872b4378206137 100644 (file)
--- a/merge.c
+++ b/merge.c
@@ -327,13 +327,20 @@ int merge_keys(struct openpgp_publickey *a, struct openpgp_publickey *b)
        struct openpgp_packet_list      *curpacket = NULL; 
        struct openpgp_packet_list      *lastpacket = NULL;
        struct openpgp_packet_list      *nextpacket = NULL;
+       uint64_t keya, keyb;
 
        if (a == NULL || b == NULL) {
                /*
                 * Do nothing.
                 */
-               rc = 1;
-       } else if (get_keyid(a) != get_keyid(b)) {
+               return 1;
+       }
+
+       if (get_keyid(a, &keya) != ONAK_E_OK) {
+               return 1;
+       } else if (get_keyid(b, &keyb) != ONAK_E_OK) {
+               return 1;
+       } else if (keya != keyb) {
                /*
                 * Key IDs are different.
                 */