From 8f5ab67fa513bc5b19fc898c6fa82b19f456d2d5 Mon Sep 17 00:00:00 2001 From: "nelsonb%netscape.com" Date: Wed, 9 Aug 2000 20:53:25 +0000 Subject: [PATCH] Use new MP_HOWMANY macro instead of equivalent code. git-svn-id: svn://10.0.0.236/trunk@75902 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/freebl/mpi/mplogic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/security/nss/lib/freebl/mpi/mplogic.c b/mozilla/security/nss/lib/freebl/mpi/mplogic.c index 2dffe540791..fb4f3c1c7e0 100644 --- a/mozilla/security/nss/lib/freebl/mpi/mplogic.c +++ b/mozilla/security/nss/lib/freebl/mpi/mplogic.c @@ -34,7 +34,7 @@ * the GPL. If you do not delete the provisions above, a recipient * may use your version of this file under either the MPL or the GPL. * - * $Id: mplogic.c,v 1.10 2000-08-02 20:52:17 nelsonb%netscape.com Exp $ + * $Id: mplogic.c,v 1.11 2000-08-09 20:53:25 nelsonb%netscape.com Exp $ */ #include "mpi-priv.h" @@ -414,7 +414,7 @@ mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits) mp_digit mask = ((1 << numBits) - 1); ARGCHK(numBits < CHAR_BIT * sizeof mask, MP_BADARG); - ARGCHK(((lsbNum + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT) <= MP_USED(a), MP_RANGE); + ARGCHK(MP_HOWMANY(lsbNum, MP_DIGIT_BIT) <= MP_USED(a), MP_RANGE); if ((numBits + lsbNum % MP_DIGIT_BIT <= MP_DIGIT_BIT) || (lsWndx + 1 >= MP_USED(a))) {