summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/syslogd
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2016-05-03 19:13:05 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2016-05-03 19:13:05 +0000
commit038c1503d1e9350cd20c8a09443719bfcda1f66d (patch)
treeb37153a44bcc30eaade4a5eab89a7485eca8d6e8 /regress/usr.sbin/syslogd
parentad5a22515d4bb07e1a70cfd730aa53c327daebcb (diff)
Fix some Perl statements perlcritic was bitching about: Variable
declared in conditional statement.
Diffstat (limited to 'regress/usr.sbin/syslogd')
-rw-r--r--regress/usr.sbin/syslogd/Proc.pm5
-rw-r--r--regress/usr.sbin/syslogd/syslogd.pl6
2 files changed, 6 insertions, 5 deletions
diff --git a/regress/usr.sbin/syslogd/Proc.pm b/regress/usr.sbin/syslogd/Proc.pm
index 1a8d47bc2b3..f2dde53614c 100644
--- a/regress/usr.sbin/syslogd/Proc.pm
+++ b/regress/usr.sbin/syslogd/Proc.pm
@@ -1,4 +1,4 @@
-# $OpenBSD: Proc.pm,v 1.7 2015/07/09 21:12:44 bluhm Exp $
+# $OpenBSD: Proc.pm,v 1.8 2016/05/03 19:13:04 bluhm Exp $
# Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org>
# Copyright (c) 2014 Florian Riehm <mail@friehm.de>
@@ -164,7 +164,8 @@ sub loggrep {
my($regex, $timeout, $count) = @_;
my $exit = ($self->{exit} // 0) << 8;
- my $end = time() + $timeout if $timeout;
+ my $end;
+ $end = time() + $timeout if $timeout;
do {
my($kid, $status, $code) = $self->wait(WNOHANG);
diff --git a/regress/usr.sbin/syslogd/syslogd.pl b/regress/usr.sbin/syslogd/syslogd.pl
index fe1b70b2b76..196d6d1690c 100644
--- a/regress/usr.sbin/syslogd/syslogd.pl
+++ b/regress/usr.sbin/syslogd/syslogd.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $OpenBSD: syslogd.pl,v 1.8 2015/09/03 18:14:35 bluhm Exp $
+# $OpenBSD: syslogd.pl,v 1.9 2016/05/03 19:13:04 bluhm Exp $
# Copyright (c) 2010-2014 Alexander Bluhm <bluhm@openbsd.org>
#
@@ -53,7 +53,7 @@ foreach my $name (qw(client syslogd server rsyslogd)) {
}
}
}
-my($s, $c, $r, @m);
+my($s, $c, $r, $rc, @m);
$s = RSyslogd->new(
%{$args{rsyslogd}},
listenport => scalar find_ports(%{$args{rsyslogd}{listen}}),
@@ -85,7 +85,7 @@ $r = Syslogd->new(
client => \$c,
server => \$s,
);
-my $rc = RSyslogd->new(
+$rc = RSyslogd->new(
%{$args{rsyslogd}},
listenport => scalar find_ports(%{$args{rsyslogd}{listen}}),
testfile => $testfile,