This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Pass NULL instead of &dummy to function
authorKarl Williamson <public@khwilliamson.com>
Tue, 16 Oct 2012 17:12:22 +0000 (11:12 -0600)
committerKarl Williamson <public@khwilliamson.com>
Wed, 17 Oct 2012 03:48:37 +0000 (21:48 -0600)
This saves the function from setting a throw-away value

regcomp.c

index fc5313c..2df4ce2 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -12618,10 +12618,9 @@ parseit:
                      * to force that */
                     if (! PL_utf8_tofold) {
                         U8 dummy[UTF8_MAXBYTES+1];
-                        STRLEN dummy_len;
 
                         /* This string is just a short named one above \xff */
-                        to_utf8_fold((U8*) HYPHEN_UTF8, dummy, &dummy_len);
+                        to_utf8_fold((U8*) HYPHEN_UTF8, dummy, NULL);
                         assert(PL_utf8_tofold); /* Verify that worked */
                     }
                     PL_utf8_foldclosures =