]> the.earth.li Git - onak.git/commitdiff
Code cleanups
authorJonathan McDowell <noodles@earth.li>
Tue, 19 Nov 2013 05:34:48 +0000 (21:34 -0800)
committerJonathan McDowell <noodles@earth.li>
Tue, 19 Nov 2013 05:34:48 +0000 (21:34 -0800)
Unused return values + unnecessary setting of variable.

keydb_db4.c
keyid.c

index 3e4a039e1cc0058a5512ecf17a37654fdbab4335..20a12fdc31f74c25d641c87dfa1bb29527282472 100644 (file)
@@ -826,7 +826,7 @@ static int db4_delete_key(struct onak_dbctx *dbctx,
                                DB_GET_BOTH);
 
                        if (ret == 0) {
-                               ret = cursor->c_del(cursor, 0);
+                               cursor->c_del(cursor, 0);
                        }
 
                        /* New style just uses the fingerprint as the data */
@@ -898,7 +898,7 @@ static int db4_delete_key(struct onak_dbctx *dbctx,
                        DB_GET_BOTH);
 
                if (ret == 0) {
-                       ret = cursor->c_del(cursor, 0);
+                       cursor->c_del(cursor, 0);
                }
 
                /* New style mapping to fingerprint */
@@ -993,7 +993,7 @@ static int db4_delete_key(struct onak_dbctx *dbctx,
                                DB_GET_BOTH);
 
                        if (ret == 0) {
-                               ret = cursor->c_del(cursor, 0);
+                               cursor->c_del(cursor, 0);
                        }
 
                        /* Remove 32 bit keyid -> fingerprint mapping */
@@ -1085,7 +1085,7 @@ static int db4_delete_key(struct onak_dbctx *dbctx,
                                DB_GET_BOTH);
 
                        if (ret == 0) {
-                               ret = cursor->c_del(cursor, 0);
+                               cursor->c_del(cursor, 0);
                        }
 
                        /* Then delete new style fingerprint mapping */
diff --git a/keyid.c b/keyid.c
index 546d65dba175336210818a89d2944982da3e3a71..5db10f6d9c03b1aa10dc652e63cc2d1ef5cc8c70 100644 (file)
--- a/keyid.c
+++ b/keyid.c
@@ -43,7 +43,6 @@ uint64_t fingerprint2keyid(struct openpgp_fingerprint *fingerprint)
        uint64_t keyid;
        int i;
 
-       keyid = 0;
        for (keyid = 0, i = 12; i < 20; i++) {
                keyid <<= 8;
                keyid += fingerprint->fp[i];