diff options
author | Werner Koch <[email protected]> | 1998-10-12 20:16:38 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-10-12 20:16:38 +0000 |
commit | 8477407e794951c686e3afe1d13035abd0153d9f (patch) | |
tree | a062f99923861fe7c55d5cc2ff3cf04daba8c8e0 /mpi/mpi-div.c | |
parent | a new release (diff) | |
download | gnupg-8477407e794951c686e3afe1d13035abd0153d9f.tar.gz gnupg-8477407e794951c686e3afe1d13035abd0153d9f.zip |
backup
Diffstat (limited to 'mpi/mpi-div.c')
-rw-r--r-- | mpi/mpi-div.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mpi/mpi-div.c b/mpi/mpi-div.c index 62ac87158..b5f5809f1 100644 --- a/mpi/mpi-div.c +++ b/mpi/mpi-div.c @@ -146,8 +146,7 @@ mpi_tdiv_qr( MPI quot, MPI rem, MPI num, MPI den) * We need space for an extra limb in the remainder, because it's * up-shifted (normalized) below. */ rsize = nsize + 1; - if( rem->alloced < rsize ) - mpi_resize( rem, rsize); + mpi_resize( rem, rsize); qsize = rsize - dsize; /* qsize cannot be bigger than this. */ if( qsize <= 0 ) { @@ -165,7 +164,7 @@ mpi_tdiv_qr( MPI quot, MPI rem, MPI num, MPI den) return; } - if( quot && quot->alloced < qsize ) + if( quot ) mpi_resize( quot, qsize); /* Read pointers here, when reallocation is finished. */ @@ -198,7 +197,8 @@ mpi_tdiv_qr( MPI quot, MPI rem, MPI num, MPI den) /* Make sure QP and NP point to different objects. Otherwise the * numerator would be gradually overwritten by the quotient limbs. */ if(qp == np) { /* Copy NP object to temporary space. */ - np = marker[markidx++] = mpi_alloc_limb_space(nsize,mpi_is_secure(quot)); + np = marker[markidx++] = mpi_alloc_limb_space(nsize, + mpi_is_secure(quot)); MPN_COPY(np, qp, nsize); } } |