From: Jonathan McDowell Date: Tue, 19 Nov 2013 05:34:48 +0000 (-0800) Subject: Code cleanups X-Git-Tag: onak-0.4.3~23 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=d76beb26081e5363c6263b6561a9e54ffb50d216;p=onak.git Code cleanups Unused return values + unnecessary setting of variable. --- diff --git a/keydb_db4.c b/keydb_db4.c index 3e4a039..20a12fd 100644 --- a/keydb_db4.c +++ b/keydb_db4.c @@ -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 546d65d..5db10f6 100644 --- 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];