#378 fix several uninitialized vars
This commit is contained in:
@@ -349,7 +349,7 @@ sub ipv6_addr_prefixlength {
|
|||||||
# Remove interface specific part from vrf interfaces
|
# Remove interface specific part from vrf interfaces
|
||||||
if ($row =~ /^((\d+\.){17}\d+)/) { $row = $1 }
|
if ($row =~ /^((\d+\.){17}\d+)/) { $row = $1 }
|
||||||
# Remove the OID part from the value
|
# Remove the OID part from the value
|
||||||
my $val = $ipv6_addr_prefix->{$row};
|
my $val = $ipv6_addr_prefix->{$row} || '';
|
||||||
if ( $val =~ /^.+?((?:\d+\.){19}(\d+))$/ ) {
|
if ( $val =~ /^.+?((?:\d+\.){19}(\d+))$/ ) {
|
||||||
$val = $2;
|
$val = $2;
|
||||||
$return->{$row} = $val;
|
$return->{$row} = $val;
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ sub model {
|
|||||||
|
|
||||||
sub vendor {
|
sub vendor {
|
||||||
my $l2 = shift;
|
my $l2 = shift;
|
||||||
my $model = $l2->model();
|
my $model = $l2->model() || '';
|
||||||
my $descr = $l2->description();
|
my $descr = $l2->description() || '';
|
||||||
|
|
||||||
if ( $model =~ /hp/i or $descr =~ /\bhp\b/i ) {
|
if ( $model =~ /hp/i or $descr =~ /\bhp\b/i ) {
|
||||||
return 'hp';
|
return 'hp';
|
||||||
|
|||||||
@@ -357,8 +357,8 @@ sub interfaces {
|
|||||||
sub vendor {
|
sub vendor {
|
||||||
my $l3 = shift;
|
my $l3 = shift;
|
||||||
|
|
||||||
my $descr = $l3->description();
|
my $descr = $l3->description() || '';
|
||||||
my $id = $l3->id();
|
my $id = $l3->id() || '';
|
||||||
|
|
||||||
# .1.3.6.1.4.1.9.1 is the CISCO-PRODUCTS-MIB
|
# .1.3.6.1.4.1.9.1 is the CISCO-PRODUCTS-MIB
|
||||||
# .1.3.6.1.4.1.9.9.368.4 is an old tree that Cisco CSSs were numbered from
|
# .1.3.6.1.4.1.9.9.368.4 is an old tree that Cisco CSSs were numbered from
|
||||||
|
|||||||
Reference in New Issue
Block a user