summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-11-26 21:35:21 +0000
committerErmal <eri@pfsense.org>2010-11-26 21:35:21 +0000
commitbad2989788835047d97667ae69b11885e2e3d493 (patch)
treef6f77f5001d34b4c51e57310c0a6d2edcf9cb861 /etc
parentadc96206c6b0aedbcf1ee515765e07fb0595b902 (diff)
downloadpfsense-bad2989788835047d97667ae69b11885e2e3d493.zip
pfsense-bad2989788835047d97667ae69b11885e2e3d493.tar.gz
No need to go through the array when the key can be tested directly.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc9
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index dcc8df6..97096c4 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 $value;
}
function activate_sysctls() {
@@ -1480,4 +1479,4 @@ function system_get_dmesg_boot() {
return file_get_contents("{$g['varlog_path']}/dmesg.boot");
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud