diff options
author | Werner Koch <wk@gnupg.org> | 2015-12-23 15:16:02 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-12-23 15:16:02 +0100 |
commit | ef7b7e91600f35b4d682a6267001a8d30f0fa49f (patch) | |
tree | 54da9e51455e63f708a51d0d4bbf544dee5a6264 /g10/keydb.c | |
parent | gpg: Do not translate debug output. (diff) | |
download | gnupg2-ef7b7e91600f35b4d682a6267001a8d30f0fa49f.tar.xz gnupg2-ef7b7e91600f35b4d682a6267001a8d30f0fa49f.zip |
gpg: Fix use of assert from commit dc417bf0.
* g10/keydb.c (keydb_update_keyblock): De-ref after the assert. Use
%zu for size_t.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keydb.c')
-rw-r--r-- | g10/keydb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/keydb.c b/g10/keydb.c index fb4966c27..2150a927a 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -1386,12 +1386,13 @@ gpg_error_t keydb_update_keyblock (KEYDB_HANDLE hd, kbnode_t kb) { gpg_error_t err; - PKT_public_key *pk = kb->pkt->pkt.public_key; + PKT_public_key *pk; KEYDB_SEARCH_DESC desc; size_t len; assert (kb); assert (kb->pkt->pkttype == PKT_PUBLIC_KEY); + pk = kb->pkt->pkt.public_key; if (!hd) return gpg_error (GPG_ERR_INV_ARG); @@ -1411,7 +1412,7 @@ keydb_update_keyblock (KEYDB_HANDLE hd, kbnode_t kb) if (len == 20) desc.mode = KEYDB_SEARCH_MODE_FPR20; else - log_bug ("%s: Unsupported key length: %zd\n", __func__, len); + log_bug ("%s: Unsupported key length: %zu\n", __func__, len); keydb_search_reset (hd); err = keydb_search (hd, &desc, 1, NULL); |