diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2012-02-21 16:11:32 -0800 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2012-02-21 16:11:32 -0800 |
commit | 2dd53861dd8005f7175f81cea971f7eaddbecc89 (patch) | |
tree | 4d63956f3dec9e2b0af715a37b5a7d5033349d49 | |
parent | e06924934de6114b57b5e36296aa0f1068ac9427 (diff) | |
download | vyatta-cfg-qos-2dd53861dd8005f7175f81cea971f7eaddbecc89.tar.gz vyatta-cfg-qos-2dd53861dd8005f7175f81cea971f7eaddbecc89.zip |
Fix validation of value 0
Confusion over if ($value) vs if (defined($value)) in argument processing
lead to 0 always being allowed.
-rwxr-xr-x | scripts/vyatta-qos-util.pl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/vyatta-qos-util.pl b/scripts/vyatta-qos-util.pl index 6dae105..1d4e754 100755 --- a/scripts/vyatta-qos-util.pl +++ b/scripts/vyatta-qos-util.pl @@ -56,10 +56,10 @@ GetOptions( "time=s" => \$timeval, ) or usage(); -getPercent($percent) if $percent; -getPercentOrRate($percentrate) if $percentrate; -getRate($rate) if $rate; -getBurstSize($burst) if $burst; -getProtocol($protocol) if $protocol; -getDsfield($dscp) if $dscp; -getTime($timeval) if $timeval; +getPercent($percent) if defined($percent); +getPercentOrRate($percentrate) if defined($percentrate); +getRate($rate) if defined($rate); +getBurstSize($burst) if defined($burst); +getProtocol($protocol) if defined($protocol); +getDsfield($dscp) if defined($dscp); +getTime($timeval) if defined($timeval); |