summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-04-14 14:41:13 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-04-14 14:41:13 -0700
commitbaa0addc4e56ee467a2c85f8f1be50ced37d901a (patch)
treeec58fa527b427bd4acc1b5ca3e892e77d3cd87e8 /lib
parentd222de9c4110494f2621fe9251254a724fa20dc5 (diff)
downloadvyatta-cfg-qos-baa0addc4e56ee467a2c85f8f1be50ced37d901a.tar.gz
vyatta-cfg-qos-baa0addc4e56ee467a2c85f8f1be50ced37d901a.zip
Simplify some code in rate handling
Diffstat (limited to 'lib')
-rw-r--r--lib/Vyatta/Qos/ShaperClass.pm5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Vyatta/Qos/ShaperClass.pm b/lib/Vyatta/Qos/ShaperClass.pm
index 1dbfd98..6654aba 100644
--- a/lib/Vyatta/Qos/ShaperClass.pm
+++ b/lib/Vyatta/Qos/ShaperClass.pm
@@ -72,10 +72,7 @@ sub matchRules {
sub _getPercentRate {
my ( $rate, $speed ) = @_;
-
- if ( !defined $rate ) {
- return; # leave rate undef
- }
+ return unless $rate; # no rate defined;
# Rate might be a percentage of speed
if ( $rate =~ /%$/ ) {