This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Only one successful exit from grok_infnan().
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 26 Aug 2014 15:14:24 +0000 (11:14 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 26 Aug 2014 23:43:19 +0000 (19:43 -0400)
numeric.c

index 355980a..f345489 100644 (file)
--- a/numeric.c
+++ b/numeric.c
@@ -658,9 +658,6 @@ Perl_grok_infnan(const char** sp, const char* send)
             flags |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
         } else
             return 0;
-
-        *sp = s;
-        return flags;
     }
     else {
         /* NAN */
@@ -686,12 +683,10 @@ Perl_grok_infnan(const char** sp, const char* send)
         }
         else
             return 0;
-
-        *sp = s;
-        return flags;
     }
 
-    return 0;
+    *sp = s;
+    return flags;
 }
 
 static const UV uv_max_div_10 = UV_MAX / 10;