From 64bfeafa52a5ed3fa82bdc0ce7ef0edddeef188c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 29 Apr 2016 11:05:24 +0200 Subject: gpg: Remove all assert.h and s/assert/log_assert/. Signed-off-by: Werner Koch --- g10/decrypt-data.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'g10/decrypt-data.c') diff --git a/g10/decrypt-data.c b/g10/decrypt-data.c index 1380fafdc..96d21774a 100644 --- a/g10/decrypt-data.c +++ b/g10/decrypt-data.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "gpg.h" #include "util.h" @@ -57,7 +56,7 @@ release_dfx_context (decode_filter_ctx_t dfx) if (!dfx) return; - assert (dfx->refcount); + log_assert (dfx->refcount); if ( !--dfx->refcount ) { gcry_cipher_close (dfx->cipher_hd); @@ -273,8 +272,8 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek) bytes are appended. */ int datalen = gcry_md_get_algo_dlen (ed->mdc_method); - assert (dfx->cipher_hd); - assert (dfx->mdc_hash); + log_assert (dfx->cipher_hd); + log_assert (dfx->mdc_hash); gcry_cipher_decrypt (dfx->cipher_hd, dfx->defer, 22, NULL, 0); gcry_md_write (dfx->mdc_hash, dfx->defer, 2); gcry_md_final (dfx->mdc_hash); @@ -320,8 +319,8 @@ mdc_decode_filter (void *opaque, int control, IOBUF a, } else if( control == IOBUFCTRL_UNDERFLOW ) { - assert (a); - assert (size > 44); /* Our code requires at least this size. */ + log_assert (a); + log_assert (size > 44); /* Our code requires at least this size. */ /* Get at least 22 bytes and put it ahead in the buffer. */ if (dfx->partial) @@ -414,7 +413,7 @@ mdc_decode_filter (void *opaque, int control, IOBUF a, } else { - assert ( dfx->eof_seen ); + log_assert ( dfx->eof_seen ); rc = -1; /* Return EOF. */ } *ret_len = n; @@ -447,7 +446,7 @@ decode_filter( void *opaque, int control, IOBUF a, byte *buf, size_t *ret_len) } else if ( control == IOBUFCTRL_UNDERFLOW ) { - assert(a); + log_assert (a); if (fc->partial) { -- cgit v1.2.3