NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/48419: Number of parenthesis in toom_interpolate_7pts.c



>Number:         48419
>Category:       misc
>Synopsis:       Number of parenthesis in toom_interpolate_7pts.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 30 13:05:00 +0000 2013
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Found by scan with cppcheck in gmp, number of parenthesis in macro BINVERT_15.
>How-To-Repeat:

>Fix:
diff -u -p -r1.1.1.1 toom_interpolate_7pts.c
--- gmp/dist/mpn/generic/toom_interpolate_7pts.c        20 Jun 2011 05:54:41 
-0000      1.1.1.1
+++ gmp/dist/mpn/generic/toom_interpolate_7pts.c        30 Nov 2013 10:44:05 
-0000
@@ -33,7 +33,7 @@ along with the GNU MP Library.  If not, 
   ((((GMP_NUMB_MAX / 9) << (6 - GMP_NUMB_BITS % 6)) * 8 & GMP_NUMB_MAX) | 0x39)
 
 #define BINVERT_15 \
-  ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 
15))
+  ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 
15)
 
 /* For the various mpn_divexact_byN here, fall back to using either
    mpn_pi1_bdiv_q_1 or mpn_divexact_1.  The former has less overhead and is



Home | Main Index | Thread Index | Old Index