This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove unnecessary pointer math.
authorAndy Lester <andy@petdance.com>
Sat, 24 Dec 2016 05:53:19 +0000 (23:53 -0600)
committerAaron Crane <arc@cpan.org>
Wed, 4 Jan 2017 19:02:22 +0000 (19:02 +0000)
sv.c

diff --git a/sv.c b/sv.c
index 83d82fc..42e3441 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2915,8 +2915,8 @@ S_infnan_2pv(NV nv, char* buffer, size_t maxlen, char plus) {
       return 0;
     }
     assert((s == buffer + 3) || (s == buffer + 4));
       return 0;
     }
     assert((s == buffer + 3) || (s == buffer + 4));
-    *s++ = 0;
-    return s - buffer - 1; /* -1: excluding the zero byte */
+    *s = 0;
+    return s - buffer;
 }
 
 /*
 }
 
 /*