summaryrefslogtreecommitdiff
path: root/set_str.c
diff options
context:
space:
mode:
authorryde <ryde@280ebfd0-de03-0410-8827-d642c229c3f4>2003-01-03 21:47:20 +0000
committerryde <ryde@280ebfd0-de03-0410-8827-d642c229c3f4>2003-01-03 21:47:20 +0000
commit1456b4151b4272f8675bf9ccb81dc4291ac2508c (patch)
tree952c839fe0f8af5316bcc0d1211bce587b3ee57a /set_str.c
parentc6c2a823419bd981da7dd69d47c074a60ac010c9 (diff)
downloadmpfr-1456b4151b4272f8675bf9ccb81dc4291ac2508c.tar.gz
Use separate function calls to strncasecmp and strncmp, rather than
?: on function pointers, since the latter demands declarations not present on SunOS. Both forms are optimized the same by gcc. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2128 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_str.c')
-rw-r--r--set_str.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/set_str.c b/set_str.c
index 9b77440cd..80b003214 100644
--- a/set_str.c
+++ b/set_str.c
@@ -1,6 +1,6 @@
/* mpfr_set_str -- set a floating-point number from a string
-Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -69,7 +69,8 @@ mpfr_set_str (mpfr_ptr x, __gmp_const char *str, int base, mp_rnd_t rnd_mode)
/* be careful that 'nan' is a valid number in base >= 24,
since n=23, a=10, n=23 */
- if (((base < 24) ? strncasecmp : strncmp) (str, "NaN", 3) == 0)
+ if (((base < 24) ? strncasecmp (str, "NaN", 3) : strncmp (str, "NaN", 3))
+ == 0)
{
MPFR_SET_NAN(x);
/* MPFR_RET_NAN not used as the return value isn't a ternary value */