This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv.c: Silence VMS compiler warning
authorKarl Williamson <khw@cpan.org>
Sat, 23 Aug 2014 23:50:11 +0000 (17:50 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 25 Aug 2014 17:13:40 +0000 (11:13 -0600)
The result of this must be at least 0 as the type is unsigned, so
the compiler gives a warning.

sv.c

diff --git a/sv.c b/sv.c
index 761addb..fd7e9f5 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -3495,7 +3495,7 @@ must_be_utf8:
                 * set so starts from there.  Otherwise, can use memory copy to
                 * get up to where we are now, and then start from here */
 
-               if (invariant_head <= 0) {
+               if (invariant_head == 0) {
                    d = dst;
                } else {
                    Copy(s, dst, invariant_head, char);