diff options
author | Werner Koch <wk@gnupg.org> | 2008-08-20 17:59:42 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-08-20 17:59:42 +0000 |
commit | 2f818ed3f919a9f8f565b67007b194fa953e7d9b (patch) | |
tree | 72827351385a8fb1e13998f9df6864287bec2dcf /cipher/primegen.c | |
parent | ee4d4642216dd04c84a360a5dd59c090e095114c (diff) | |
download | libgcrypt-2f818ed3f919a9f8f565b67007b194fa953e7d9b.tar.gz |
Replace assert calls by a new gcry_assert at most places.
Diffstat (limited to 'cipher/primegen.c')
-rw-r--r-- | cipher/primegen.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cipher/primegen.c b/cipher/primegen.c index 11da16a0..ef2d11d7 100644 --- a/cipher/primegen.c +++ b/cipher/primegen.c @@ -24,7 +24,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <assert.h> #include <errno.h> #include "g10lib.h" @@ -208,7 +207,7 @@ get_pool_prime (unsigned int nbits, gcry_random_level_t randomlevel) { gcry_mpi_t prime = item->prime; item->prime = NULL; - assert (nbits == mpi_get_nbits (prime)); + gcry_assert (nbits == mpi_get_nbits (prime)); return prime; } return NULL; @@ -950,7 +949,7 @@ is_prime (gcry_mpi_t n, int steps, unsigned int *count) mpi_set_highbit( x, nbits-2 ); mpi_clear_bit( x, nbits-2 ); } - assert ( mpi_cmp( x, nminus1 ) < 0 && mpi_cmp_ui( x, 1 ) > 0 ); + gcry_assert (mpi_cmp (x, nminus1) < 0 && mpi_cmp_ui (x, 1) > 0); } gcry_mpi_powm ( y, x, q, n); if ( mpi_cmp_ui(y, 1) && mpi_cmp( y, nminus1 ) ) |