This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Use NULL first parameter to _invlist_union
authorKarl Williamson <public@khwilliamson.com>
Fri, 3 Feb 2012 21:55:45 +0000 (14:55 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 9 Feb 2012 17:13:53 +0000 (10:13 -0700)
A previous commit has changed _invlist_union() to accept a NULL
first parameter.  This takes advantage of that to simplify some code.

regcomp.c

index e474b30..27309ff 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -10444,12 +10444,7 @@ parseit:
                             swash = NULL;
                         }
                         else {
                             swash = NULL;
                         }
                         else {
-                           if (! properties) {
-                               properties = invlist_clone(invlist);
-                           }
-                           else {
-                               _invlist_union(properties, invlist, &properties);
-                           }
+                            _invlist_union(properties, invlist, &properties);
                        }
                    }
                    Safefree(name);
                        }
                    }
                    Safefree(name);