Commit 25fbcaeb authored by Robert Ricci's avatar Robert Ricci
Browse files

BUG FIX: Work around write() bug in perl 5.10

perl 5.10 has a bug that causes it to segfault if a variable
delcared with 'my' is used in a format string. Work around this
by declaring the variables 'our' instead.
parent 57250f2b
......@@ -1113,8 +1113,11 @@ sub doListVlans ($) {
# These need to be declared here for the benefit of the format string
# See perlform(1) for help with formats
# Note that they are declared 'our' rather than 'my' due to a stupid
# bug in perl 5.10
my ($vlan_id,$ddep,$pideid,$vname,$members);
our ($vlan_id,$ddep,$pideid,$vname,$members);
# Check to see if they want device-specific VLAN numbers, which makes the
# display more cramped, but is useful for debugging
......@@ -1267,7 +1270,7 @@ sub doListPorts($) {
# See perlform(1) for help with formats
my ($port,$enabled,$up,$speed,$duplex);
our ($port,$enabled,$up,$speed,$duplex);
print << "END";
Port Enabled Up Speed Duplex
......@@ -1470,7 +1473,7 @@ sub doGetStats($) {
push @statList, $stack->getStats();
my ($port, $inoctets, $inunicast, $innunicast, $indiscards, $inerr,
our ($port, $inoctets, $inunicast, $innunicast, $indiscards, $inerr,
$inunk, $outoctets, $outunicast, $outnunicast, $outdiscards,
Supports Markdown
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