[pve-devel] [PATCH 3/6] setup_tc_rate_limit : delete class and filter before update

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Tue Mar 5 12:39:04 CET 2013


this is too complex

+ return if (!$rate || ($rate && $rate == 0));

this is the same:
return if !$rate;

$rate can be 0 or undef

Stefan

Am 05.03.2013 12:20, schrieb Alexandre DERUMIER:
>>> This expression makes no sense to me? Maybe we just need 
>>>
>>> return if !$rate; 
> 
> pve-manager can send rate=0 to api2, is it filtered somewhere ?
> (just to be sure, in perl, is 0 != undef ? )
> ----- Mail original ----- 
> 
> De: "Dietmar Maurer" <dietmar at proxmox.com> 
> À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com 
> Envoyé: Mardi 5 Mars 2013 11:52:23 
> Objet: RE: [pve-devel] [PATCH 3/6] setup_tc_rate_limit : delete class and filter before update 
> 
>> system("/sbin/tc qdisc del dev $iface root >/dev/null 2>&1"); 
>>
>> + return if (!$rate || ($rate && $rate == 0)); 
> 
> This expression makes no sense to me? Maybe we just need 
> 
> return if !$rate; 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 



More information about the pve-devel mailing list