diff options
author | Werner Koch <[email protected]> | 2019-05-14 08:31:46 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-05-14 08:31:46 +0000 |
commit | 54e96c6fd262bd0090fec836c97d7fdb04bd6129 (patch) | |
tree | 93ead3e2aac01b8317d18a31b980f7d7fec5e4e2 /agent/protect-tool.c | |
parent | agent: correct length for uri and comment on 64-bit big-endian platforms (diff) | |
download | gnupg-54e96c6fd262bd0090fec836c97d7fdb04bd6129.tar.gz gnupg-54e96c6fd262bd0090fec836c97d7fdb04bd6129.zip |
agent: Replace most assert by log_assert.
--
Diffstat (limited to 'agent/protect-tool.c')
-rw-r--r-- | agent/protect-tool.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/agent/protect-tool.c b/agent/protect-tool.c index 30d78cd43..059a9bdbd 100644 --- a/agent/protect-tool.c +++ b/agent/protect-tool.c @@ -25,7 +25,6 @@ #include <stdarg.h> #include <string.h> #include <errno.h> -#include <assert.h> #include <sys/stat.h> #include <unistd.h> #ifdef HAVE_LOCALE_H @@ -198,10 +197,10 @@ make_canonical (const char *fname, const char *buf, size_t buflen) return NULL; } len = gcry_sexp_sprint (sexp, GCRYSEXP_FMT_CANON, NULL, 0); - assert (len); + log_assert (len); result = xmalloc (len); len = gcry_sexp_sprint (sexp, GCRYSEXP_FMT_CANON, result, len); - assert (len); + log_assert (len); gcry_sexp_release (sexp); return result; } @@ -222,10 +221,10 @@ make_advanced (const unsigned char *buf, size_t buflen) return NULL; } len = gcry_sexp_sprint (sexp, GCRYSEXP_FMT_ADVANCED, NULL, 0); - assert (len); + log_assert (len); result = xmalloc (len); len = gcry_sexp_sprint (sexp, GCRYSEXP_FMT_ADVANCED, result, len); - assert (len); + log_assert (len); gcry_sexp_release (sexp); return result; } @@ -433,7 +432,7 @@ read_and_shadow (const char *fname) return; } resultlen = gcry_sexp_canon_len (result, 0, NULL,NULL); - assert (resultlen); + log_assert (resultlen); if (opt_armor) { @@ -469,7 +468,7 @@ show_shadow_info (const char *fname) return; } infolen = gcry_sexp_canon_len (info, 0, NULL,NULL); - assert (infolen); + log_assert (infolen); if (opt_armor) { @@ -496,7 +495,7 @@ show_file (const char *fname) return; keylen = gcry_sexp_canon_len (key, 0, NULL,NULL); - assert (keylen); + log_assert (keylen); if (opt_canonical) { @@ -723,7 +722,7 @@ get_passphrase (int promptno) gpg_strerror (err)); agent_exit (0); } - assert (pw); + log_assert (pw); return pw; } |