From a975706fff37f47b773da07279812d3c90ad0281 Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Wed, 31 Jul 2019 19:31:15 +0200 Subject: [PATCH] plugins: another round of defined(@array) fixing --- plugins/apache/apache_smaps | 2 +- plugins/other/proc_ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/apache/apache_smaps b/plugins/apache/apache_smaps index abc0974e..905fe471 100755 --- a/plugins/apache/apache_smaps +++ b/plugins/apache/apache_smaps @@ -37,7 +37,7 @@ if (!eval "require Linux::Smaps;") { my $PNAME = exists $ENV{'pname'} ? $ENV{'pname'} : "httpd"; my $PUSER = exists $ENV{'puser'} ? $ENV{'puser'} : "apache"; -if (defined(@ARGV) && ($ARGV[0] eq 'config')) { +if (@ARGV && ($ARGV[0] eq 'config')) { print "graph_title Apache Smaps\n"; print "graph_args --base 1024 -l 0\n"; print "graph_vlabel Bytes\n"; diff --git a/plugins/other/proc_ b/plugins/other/proc_ index 473da807..751a5699 100755 --- a/plugins/other/proc_ +++ b/plugins/other/proc_ @@ -242,7 +242,7 @@ sub populate_stats # Bail-function. sub usage { - if (defined(@_) && "@_" ne "") { + if (@_ && "@_" ne "") { print STDERR "@_" . "\n\n"; } print STDERR "Known arguments: suggest, config, autoconf.\n";