diff options
author | Phil Davis <phil.davis@inf.org> | 2016-03-29 06:59:06 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-03-29 06:59:06 +0545 |
commit | 1cdd354e3ff56970215c169ac77b13f8d1dbca5c (patch) | |
tree | 2710f42d53ca8c239777a5da59a02e67e6505ecc /src | |
parent | fbe6a2ce782a09a043c871215d0b8c4812fc7778 (diff) | |
download | pfsense-1cdd354e3ff56970215c169ac77b13f8d1dbca5c.zip pfsense-1cdd354e3ff56970215c169ac77b13f8d1dbca5c.tar.gz |
Add brackets for clarity
Add some extra brackets for clarity, rather than relying on the operator
precedence rules. IMHO this makes it more readable, and no need for the
reader to wonder if anything might go wrong with the operator
precedence.
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 2 | ||||
-rw-r--r-- | src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc | 4 | ||||
-rw-r--r-- | src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 15fc0b4..2b02d80 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4766,7 +4766,7 @@ function upgrade_148_to_149() { foreach ($altq_list_queues as $altq) { $sum = $altq->GetTotalBw(); while ($sum > get_queue_bandwidth($altq)) { - if (intval(($sum / 1000) * 1.2) < 1024 * 1024) + if (intval(($sum / 1000) * 1.2) < (1024 * 1024)) /* 1Gb where possible. */ $bw = 1024 * 1024; else diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc index b29d1d0..918e27a 100644 --- a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc +++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc @@ -1227,9 +1227,9 @@ function apply_all_chosen_items() { } else if ($sched == "HFSC") { $tmpcf['upperlimit'] = "on"; - $tmpcf['upperlimit3'] = $downqbw / 1000 . "Kb"; + $tmpcf['upperlimit3'] = ($downqbw / 1000) . "Kb"; $tmpcf['linkshare'] = "on"; - $tmpcf['linkshare3'] = $downqbw / 1000 . "Kb"; + $tmpcf['linkshare3'] = ($downqbw / 1000) . "Kb"; $tmpcf['bandwidth'] = $downqbw / 1000; $tmpcf['bandwidthtype'] = "Kb"; } diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc index d7f5e7a..8733925 100644 --- a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc +++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc @@ -1306,8 +1306,8 @@ function apply_all_chosen_items() { $tmpcf['bandwidthtype'] = "Kb"; } else if ($sched == "HFSC") { - $tmpcf['linkshare3'] = $lanqbw/1000 . "Kb"; - $tmpcf['upperlimit3'] = $lanqbw/1000 . "Kb"; + $tmpcf['linkshare3'] = ($lanqbw/1000) . "Kb"; + $tmpcf['upperlimit3'] = ($lanqbw/1000) . "Kb"; $tmpcf['upperlimit'] = "on"; $tmpcf['linkshare'] = "on"; $tmpcf['bandwidth'] = $lanqbw/1000; |