summaryrefslogtreecommitdiff
path: root/mpz/com.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-05-06 00:45:00 +0200
committerKevin Ryde <user42@zip.com.au>2003-05-06 00:45:00 +0200
commit90a841862fce64a305c2a2b2ea120063837d687a (patch)
treed16c1bf4bdef869785355f804a548846534cf440 /mpz/com.c
parent9e61f0deb5e5069e3663d612fff782d7023ca1e9 (diff)
downloadgmp-90a841862fce64a305c2a2b2ea120063837d687a.tar.gz
* mpz/com.c: Rate size==0 as UNLIKELY, fix comment to mpn_add_1.
Diffstat (limited to 'mpz/com.c')
-rw-r--r--mpz/com.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mpz/com.c b/mpz/com.c
index 8534303e6..4dc00db70 100644
--- a/mpz/com.c
+++ b/mpz/com.c
@@ -1,7 +1,7 @@
/* mpz_com(mpz_ptr dst, mpz_ptr src) -- Assign the bit-complemented value of
SRC to DST.
-Copyright 1991, 1993, 1994, 1996, 2001 Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -42,10 +42,9 @@ mpz_com (mpz_ptr dst, mpz_srcptr src)
src_ptr = src->_mp_d;
dst_ptr = dst->_mp_d;
- if (size == 0)
+ if (UNLIKELY (size == 0))
{
- /* Special case, as mpn_add wants the first arg's size >= the
- second arg's size. */
+ /* special case, as mpn_add_1 wants size!=0 */
dst_ptr[0] = 1;
dst->_mp_size = -1;
return;