diff options
| author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-14 14:41:13 -0700 |
|---|---|---|
| committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-14 14:41:13 -0700 |
| commit | baa0addc4e56ee467a2c85f8f1be50ced37d901a (patch) | |
| tree | ec58fa527b427bd4acc1b5ca3e892e77d3cd87e8 /lib | |
| parent | d222de9c4110494f2621fe9251254a724fa20dc5 (diff) | |
| download | vyatta-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.pm | 5 |
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 =~ /%$/ ) { |
