diff options
author | Werner Koch <[email protected]> | 1999-12-08 21:03:03 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1999-12-08 21:03:03 +0000 |
commit | 4555c0be941cef55486b7a1644d9b70f4ea50c77 (patch) | |
tree | 1a10627bf31163f9aef5040724c53f75e8daf3e6 /mpi/mpi-bit.c | |
parent | See ChangeLog: Fri Nov 19 17:15:20 CET 1999 Werner Koch (diff) | |
download | gnupg-4555c0be941cef55486b7a1644d9b70f4ea50c77.tar.gz gnupg-4555c0be941cef55486b7a1644d9b70f4ea50c77.zip |
See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner Koch
Diffstat (limited to 'mpi/mpi-bit.c')
-rw-r--r-- | mpi/mpi-bit.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mpi/mpi-bit.c b/mpi/mpi-bit.c index f1eff8636..45ca029ed 100644 --- a/mpi/mpi-bit.c +++ b/mpi/mpi-bit.c @@ -55,7 +55,7 @@ __clz_tab[] = void mpi_normalize( MPI a ) { - if( mpi_is_protected(a) ) + if( mpi_is_opaque(a) ) return; for( ; a->nlimbs && !a->d[a->nlimbs-1]; a->nlimbs-- ) @@ -67,16 +67,13 @@ mpi_normalize( MPI a ) /**************** * Return the number of bits in A. */ -unsigned +unsigned int mpi_get_nbits( MPI a ) { unsigned n; - if( mpi_is_protected(a) ) { - n = mpi_get_nbit_info(a); - if( !n ) - n = a->nlimbs * BITS_PER_MPI_LIMB; - return n; + if( mpi_is_opaque(a) ) { + return a->sign; /* which holds the number of bits */ } mpi_normalize( a ); |