]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Escape regexps properly in settings-get.pl to avoid warnings with new Perl
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 4 Mar 2016 11:12:59 +0000 (13:12 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 4 Mar 2016 14:41:02 +0000 (16:41 +0200)
src/config/settings-get.pl

index 3cc2247594a9c2ef2ea01e512573d63222f669ec..7c6edfeea0b61d5af5d1c1e06dfdcf31b25fb46e 100755 (executable)
@@ -37,11 +37,11 @@ foreach my $file (@ARGV) {
   while (<$f>) {
     my $write = 0;
     if ($state == 0) {
-      if (/struct .*_settings {/ ||
-         /struct setting_define.*{/ ||
-         /struct .*_default_settings = {/) {
+      if (/struct .*_settings \{/ ||
+         /struct setting_define.*\{/ ||
+         /struct .*_default_settings = \{/) {
        $state++;
-      } elsif (/^struct service_settings (.*) = {/) {
+      } elsif (/^struct service_settings (.*) = \{/) {
        $state++;
        if ($ifdef eq "") {
          $state_ifdef = 0;
@@ -51,7 +51,7 @@ foreach my $file (@ARGV) {
        }
        push @services, $1;
        push @service_ifdefs, $ifdef;
-      } elsif (/^(static )?const struct setting_parser_info (.*) = {/) {
+      } elsif (/^(static )?const struct setting_parser_info (.*) = \{/) {
        $cur_name = $2;
        $state++ if ($cur_name !~ /^\*default_/);
       } elsif (/^extern const struct setting_parser_info (.*);/) {