Skip to content

Commit

Permalink
config: Escape regexps properly in settings-get.pl to avoid warnings …
Browse files Browse the repository at this point in the history
…with new Perl
  • Loading branch information
sirainen committed Mar 4, 2016
1 parent fe789d2 commit 3e6b7d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/config/settings-get.pl
Expand Up @@ -37,11 +37,11 @@
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;
Expand All @@ -51,7 +51,7 @@
}
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 (.*);/) {
Expand Down

0 comments on commit 3e6b7d0

Please sign in to comment.