summaryrefslogtreecommitdiffstats
path: root/g10/keyring.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-06-23 17:16:12 +0200
committerWerner Koch <wk@gnupg.org>2003-06-23 17:16:12 +0200
commitb7bd5e8088ae0318ca5c82daa60881ac3f7e6e54 (patch)
tree313ae8c00545843ded59e4b6797f516de8997150 /g10/keyring.c
parentFinished the bulk of changes for gnupg 1.9. This included switching (diff)
downloadgnupg2-b7bd5e8088ae0318ca5c82daa60881ac3f7e6e54.tar.xz
gnupg2-b7bd5e8088ae0318ca5c82daa60881ac3f7e6e54.zip
Fixes to the libgcrypt switch. Basically works now.
Diffstat (limited to 'g10/keyring.c')
-rw-r--r--g10/keyring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/keyring.c b/g10/keyring.c
index cc1150065..4639e9462 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -125,7 +125,7 @@ new_offset_hash_table (void)
{
struct off_item **tbl;
- tbl = xcalloc (1,2048 * sizeof *tbl);
+ tbl = xcalloc (2048, sizeof *tbl);
return tbl;
}
@@ -387,7 +387,7 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
save_mode = set_packet_list_mode(0);
while ((rc=parse_packet (a, pkt)) != -1) {
hd->found.n_packets++;
- if (rc == GPG_ERR_UNKNOWN_PACKET) {
+ if (gpg_err_code (rc) == GPG_ERR_UNKNOWN_PACKET) {
free_packet (pkt);
init_packet (pkt);
continue;
@@ -478,7 +478,7 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
/* Make sure that future search operations fail immediately when
* we know that we are working on a invalid keyring
*/
- if (rc == GPG_ERR_INV_KEYRING)
+ if (gpg_err_code (rc) == GPG_ERR_INV_KEYRING)
hd->current.error = rc;
return rc;