From a0ffd9d8670844fdd08aa2d976986d13e8ffc2d9 Mon Sep 17 00:00:00 2001 From: Robert Lanyi Date: Sun, 22 Mar 2020 14:59:37 +0100 Subject: [PATCH] Fix warning when THREADS env var is missing --- bin/rrd-extractstats.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/rrd-extractstats.pl b/bin/rrd-extractstats.pl index 9a824ab..a729720 100755 --- a/bin/rrd-extractstats.pl +++ b/bin/rrd-extractstats.pl @@ -43,7 +43,7 @@ $|=1; my $i :shared = 0; my $num_workers = 1; -if (($ENV{'THREADS'} =~ /^\d+$/) and ($ENV{'THREADS'} > 0)) { +if (($ENV{'THREADS'}) and ($ENV{'THREADS'} =~ /^\d+$/) and ($ENV{'THREADS'} > 0)) { $num_workers = $ENV{'THREADS'}; } print("Using " . $num_workers . " threads.\n");