summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--set_str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/set_str.c b/set_str.c
index c537478ea..f463abc8c 100644
--- a/set_str.c
+++ b/set_str.c
@@ -96,7 +96,7 @@ mpfr_set_str (mpfr_t x, const char *str, int base, mp_rnd_t rnd)
if (base < 2 || base > 36)
return -1;
- if (strlen(str) >= 5 && strncasecmp (str, "@NaN@", 5) == 0)
+ if (strncasecmp (str, "@NaN@", 5) == 0)
{
MPFR_SET_NAN(x);
/* MPFR_RET_NAN not used as the return value isn't a ternary value */
@@ -111,7 +111,7 @@ mpfr_set_str (mpfr_t x, const char *str, int base, mp_rnd_t rnd)
/* be careful that 'inf' is a valid number in base >= 24,
since i=18, n=23, f=15 */
- if (strlen(str) >= 3 && strncasecmp (str, "@Inf@", 5) == 0)
+ if (strncasecmp (str, "@Inf@", 5) == 0)
{
MPFR_CLEAR_NAN (x);
MPFR_SET_INF (x);