diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-11-28 19:19:27 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-11-28 19:19:27 -0700 |
commit | f3c91cb5ac9b5401d389111f9f0216234ecdfb42 (patch) | |
tree | 9c4658cb9536ef03c2a3c7be113dbf932b9b6225 /etc/inc/system.inc | |
parent | d04e808277b52fa3e47c8832b7cf5ecfed3edf82 (diff) | |
download | pfsense-f3c91cb5ac9b5401d389111f9f0216234ecdfb42.zip pfsense-f3c91cb5ac9b5401d389111f9f0216234ecdfb42.tar.gz |
Reintroduce this optimization, but use the correct return value this time.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index dcc8df6..c43d67e 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -52,10 +52,9 @@ function activate_powerd() { function get_default_sysctl_value($id) { global $sysctls; - foreach($sysctls as $sysctl => $value) { - if($sysctl == $id) - return $value; - } + + if (isset($sysctls[$id])) + return $sysctls[$id]; } function activate_sysctls() { |