Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-release-src > by-pkgid > eaf0cf22a7a21e166138f9006749da0c > files > 3

nagios-check_memory-1.7-3mdv2009.1.src.rpm

--- check_mem.pl~	2008-06-25 12:59:55.000000000 +0200
+++ check_mem.pl	2008-06-25 13:00:55.000000000 +0200
@@ -78,9 +78,14 @@
 
 print_usage() unless (($opt_c) && ($opt_w));
 
-my ($mem_critical, $swap_critical) = ($1,$2) if ($opt_c =~ /([0-9]+),([0-9]+)/);
-my ($mem_warning, $swap_warning) = ($1,$2) if ($opt_w =~ /([0-9]+),([0-9]+)/);
+# initialisation
+my $mem_critical = 0;
+my $mem_warning = 0;
+my $swap_critical = 0;
+my $swap_warning = 0;
 
+($mem_critical, $swap_critical) = ($1,$2) if ($opt_c =~ /([0-9]+),([0-9]+)/);
+($mem_warning, $swap_warning) = ($1,$2) if ($opt_w =~ /([0-9]+),([0-9]+)/);
 
 # print threshold in output message
 my $mem_threshold_output = " (";