From cb287eb4589e46b72001d8e84de1eb5bae26d543 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 22 Oct 2007 17:42:55 -0700 Subject: Fix uninitialized value when no trap-target has been configured. --- scripts/vyatta-snmp.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/vyatta-snmp.pl b/scripts/vyatta-snmp.pl index 59c7524b..511e1054 100644 --- a/scripts/vyatta-snmp.pl +++ b/scripts/vyatta-snmp.pl @@ -95,8 +95,7 @@ sub snmp_get_values { $output .= "syslocation \"$location\" \n"; } - my $multivalues = $config->returnValue("trap-target"); - my @trap_targets = split("\n", $multivalues); + my @trap_targets = $config->returnValues("trap-target"); foreach my $trap_target (@trap_targets) { $output .= "trapsink $trap_target\n"; } -- cgit v1.2.3