summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-06 19:41:29 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-06 19:41:29 +0000
commit2854d35ac994525273becdfa8d59e4810147e372 (patch)
treeb245ce76bbb7501245d07b10d37ed275c287a441 /etc
parent90779bf7f6ccddffb41415ed44ae9ea0c46ab143 (diff)
downloadpfsense-2854d35ac994525273becdfa8d59e4810147e372.zip
pfsense-2854d35ac994525273becdfa8d59e4810147e372.tar.gz
Simplify is_subqueue if logic
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc17
1 files changed, 8 insertions, 9 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 05cc2db..9b12a23 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -308,15 +308,14 @@ function filter_setup_altq_interfaces() {
function is_subqueue($name) {
global $config;
$status = "";
- if (is_array($config['shaper']['queue'])) {
- foreach ($config['shaper']['queue'] as $queue) {
- if(is_array($queue['subqueue'])) {
- foreach ($queue['subqueue'] as $sq) {
- if($sq['name'] == $name) return 1;
- }
- }
- }
- }
+ if (!is_array($config['shaper']['queue'])) return 0;
+ foreach ($config['shaper']['queue'] as $queue) {
+ if(is_array($queue['subqueue'])) {
+ foreach ($queue['subqueue'] as $sq) {
+ if($sq['name'] == $name) return 1;
+ }
+ }
+ }
return 0;
}
OpenPOWER on IntegriCloud