Date: Tue, 24 Feb 2015 16:45:17 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279240 - head/lib/msun/src Message-ID: <201502241645.t1OGjHQ7008798@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Tue Feb 24 16:45:16 2015 New Revision: 279240 URL: https://svnweb.freebsd.org/changeset/base/279240 Log: msun: drop unnecessary checks (part 2). Drop an unnecessary check in some calculations. The check would have Coverity falsely conclude that a variable could be left undefined. Modified: head/lib/msun/src/e_j0.c head/lib/msun/src/e_j0f.c head/lib/msun/src/e_j1.c head/lib/msun/src/e_j1f.c Modified: head/lib/msun/src/e_j0.c ============================================================================== --- head/lib/msun/src/e_j0.c Tue Feb 24 15:35:26 2015 (r279239) +++ head/lib/msun/src/e_j0.c Tue Feb 24 16:45:16 2015 (r279240) @@ -373,7 +373,7 @@ static const double qS2[6] = { if(ix>=0x40200000) {p = qR8; q= qS8;} else if(ix>=0x40122E8B){p = qR5; q= qS5;} else if(ix>=0x4006DB6D){p = qR3; q= qS3;} - else if(ix>=0x40000000){p = qR2; q= qS2;} + else {p = qR2; q= qS2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5]))))); Modified: head/lib/msun/src/e_j0f.c ============================================================================== --- head/lib/msun/src/e_j0f.c Tue Feb 24 15:35:26 2015 (r279239) +++ head/lib/msun/src/e_j0f.c Tue Feb 24 16:45:16 2015 (r279240) @@ -329,7 +329,7 @@ static const float qS2[6] = { if(ix>=0x41000000) {p = qR8; q= qS8;} else if(ix>=0x40f71c58){p = qR5; q= qS5;} else if(ix>=0x4036db68){p = qR3; q= qS3;} - else if(ix>=0x40000000){p = qR2; q= qS2;} + else {p = qR2; q= qS2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5]))))); Modified: head/lib/msun/src/e_j1.c ============================================================================== --- head/lib/msun/src/e_j1.c Tue Feb 24 15:35:26 2015 (r279239) +++ head/lib/msun/src/e_j1.c Tue Feb 24 16:45:16 2015 (r279240) @@ -368,7 +368,7 @@ static const double qs2[6] = { if(ix>=0x40200000) {p = qr8; q= qs8;} else if(ix>=0x40122E8B){p = qr5; q= qs5;} else if(ix>=0x4006DB6D){p = qr3; q= qs3;} - else if(ix>=0x40000000){p = qr2; q= qs2;} + else {p = qr2; q= qs2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5]))))); Modified: head/lib/msun/src/e_j1f.c ============================================================================== --- head/lib/msun/src/e_j1f.c Tue Feb 24 15:35:26 2015 (r279239) +++ head/lib/msun/src/e_j1f.c Tue Feb 24 16:45:16 2015 (r279240) @@ -325,7 +325,7 @@ static const float qs2[6] = { if(ix>=0x40200000) {p = qr8; q= qs8;} else if(ix>=0x40f71c58){p = qr5; q= qs5;} else if(ix>=0x4036db68){p = qr3; q= qs3;} - else if(ix>=0x40000000){p = qr2; q= qs2;} + else {p = qr2; q= qs2;} /* ix>=0x40000000 */ z = one/(x*x); r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5])))); s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502241645.t1OGjHQ7008798>