diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-02-09 16:00:09 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-02-09 16:00:09 +0900 |
commit | 8bffc2850be3e430e7f6faec136d31c6c815f93f (patch) | |
tree | b703788e194f295f6d48fa9bbfc8622546a92650 /g10/keyring.c | |
parent | 158ef6d574d6bd975c94e86476cb1631e775a40c (diff) | |
download | gpg2-8bffc2850be3e430e7f6faec136d31c6c815f93f.tar.gz gpg2-8bffc2850be3e430e7f6faec136d31c6c815f93f.tar.bz2 gpg2-8bffc2850be3e430e7f6faec136d31c6c815f93f.zip |
Imported Upstream version 2.1.12upstream/2.1.12
Diffstat (limited to 'g10/keyring.c')
-rw-r--r-- | g10/keyring.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/g10/keyring.c b/g10/keyring.c index 7c7b355..843975e 100644 --- a/g10/keyring.c +++ b/g10/keyring.c @@ -23,7 +23,6 @@ #include <stdlib.h> #include <string.h> #include <errno.h> -#include <assert.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> @@ -243,7 +242,7 @@ keyring_new (void *token) KEYRING_HANDLE hd; KR_RESOURCE resource = token; - assert (resource); + log_assert (resource); hd = xtrycalloc (1, sizeof *hd); if (!hd) @@ -258,7 +257,7 @@ keyring_release (KEYRING_HANDLE hd) { if (!hd) return; - assert (active_handles > 0); + log_assert (active_handles > 0); active_handles--; xfree (hd->word_match.name); xfree (hd->word_match.pattern); @@ -691,7 +690,7 @@ keyring_delete_keyblock (KEYRING_HANDLE hd) int keyring_search_reset (KEYRING_HANDLE hd) { - assert (hd); + log_assert (hd); hd->current.kr = NULL; iobuf_close (hd->current.iobuf); @@ -749,10 +748,10 @@ prepare_search (KEYRING_HANDLE hd) if (!hd->current.kr) { if (DBG_LOOKUP) log_debug ("%s: keyring not available!\n", __func__); - hd->current.eof = 1; - return -1; /* keyring not available */ + hd->current.eof = 1; + return -1; /* keyring not available */ } - assert (!hd->current.iobuf); + log_assert (!hd->current.iobuf); } else { /* EOF */ if (DBG_LOOKUP) @@ -1084,7 +1083,7 @@ keyring_search (KEYRING_HANDLE hd, KEYDB_SEARCH_DESC *desc, if (desc[n].mode == KEYDB_SEARCH_MODE_WORDS) name = desc[n].u.name; } - assert (name); + log_assert (name); if ( !hd->word_match.name || strcmp (hd->word_match.name, name) ) { /* name changed */ @@ -1713,7 +1712,7 @@ do_copy (int mode, const char *fname, KBNODE root, goto leave; } /* skip this keyblock */ - assert( n_packets ); + log_assert( n_packets ); rc = skip_some_packets( fp, n_packets ); if( rc ) { log_error("%s: skipping %u packets failed: %s\n", |