From d76beb26081e5363c6263b6561a9e54ffb50d216 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Mon, 18 Nov 2013 21:34:48 -0800 Subject: [PATCH] Code cleanups Unused return values + unnecessary setting of variable. --- keydb_db4.c | 8 ++++---- keyid.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) 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]; -- 2.39.5