From 45706bb7bc7b2ea9fc2d7a1f361a7a90ce305536 Mon Sep 17 00:00:00 2001 From: knutroy Date: Fri, 24 Aug 2007 13:57:58 +0000 Subject: [PATCH] Minor fix to avoid some potential warnings. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1921 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-tools/regress/lib/Varnish/Test/Client.pm | 2 +- varnish-tools/regress/lib/Varnish/Test/Server.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/varnish-tools/regress/lib/Varnish/Test/Client.pm b/varnish-tools/regress/lib/Varnish/Test/Client.pm index 217c8ae5..02453647 100644 --- a/varnish-tools/regress/lib/Varnish/Test/Client.pm +++ b/varnish-tools/regress/lib/Varnish/Test/Client.pm @@ -107,7 +107,7 @@ sub shutdown($) { if (defined($self->{'fh'})) { my $inbuffer = $self->{'mux'}->inbuffer($self->{'fh'}); - if ($inbuffer ne '') { + if (defined($inbuffer) and $inbuffer ne '') { use Data::Dumper; $self->log('Discarding: ' . Dumper(\$inbuffer)); diff --git a/varnish-tools/regress/lib/Varnish/Test/Server.pm b/varnish-tools/regress/lib/Varnish/Test/Server.pm index 78747887..a206468e 100644 --- a/varnish-tools/regress/lib/Varnish/Test/Server.pm +++ b/varnish-tools/regress/lib/Varnish/Test/Server.pm @@ -147,7 +147,7 @@ sub shutdown($) { my $inbuffer = $self->{'mux'}->inbuffer($self->{'fh'}); - if ($inbuffer ne '') { + if (defined($inbuffer) and $inbuffer ne '') { use Data::Dumper; $self->{'server'}->log('Junk or incomplete request. Discarding: ' . Dumper(\$inbuffer)); -- 2.39.5