From baa0addc4e56ee467a2c85f8f1be50ced37d901a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 14 Apr 2009 14:41:13 -0700 Subject: Simplify some code in rate handling --- lib/Vyatta/Qos/ShaperClass.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/Vyatta/Qos') 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 =~ /%$/ ) { -- cgit v1.2.3