mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Replace most assert by log_assert.
--
This commit is contained in:
parent
5651b2c460
commit
54e96c6fd2
17 changed files with 42 additions and 60 deletions
|
@ -24,8 +24,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "agent.h"
|
||||
|
@ -250,13 +248,13 @@ do_encode_raw_pkcs1 (const byte *md, size_t mdlen, unsigned int nbits,
|
|||
frame[n++] = 0;
|
||||
frame[n++] = 1; /* Block type. */
|
||||
i = nframe - mdlen - 3 ;
|
||||
assert (i >= 8); /* At least 8 bytes of padding. */
|
||||
log_assert (i >= 8); /* At least 8 bytes of padding. */
|
||||
memset (frame+n, 0xff, i );
|
||||
n += i;
|
||||
frame[n++] = 0;
|
||||
memcpy (frame+n, md, mdlen );
|
||||
n += mdlen;
|
||||
assert (n == nframe);
|
||||
log_assert (n == nframe);
|
||||
|
||||
/* Create the S-expression. */
|
||||
rc = gcry_sexp_build (&hash, NULL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue