Commit 451c2268 authored by Weibin Sun's avatar Weibin Sun Committed by Robert Ricci

Fix undefined return value

parent db1c439a
......@@ -583,7 +583,7 @@ sub createVlan($$$) {
print " Creating VLAN $vlan_id as VLAN #$vlan_number on " .
"$self->{NAME} ...\n";
if ($resp ne "1") {
if (!defined($resp) || $resp ne "1") {
warn " WARNING: $id Creating VLAN $vlan_id as VLAN #$vlan_number on ".
"$self->{NAME} failed.".(defined($resp)?" error: $resp":"")."\n";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment