summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-31 10:55:20 +0545
committerPhil Davis <phil.davis@inf.org>2015-05-31 10:55:20 +0545
commit086cf944580b3a62a7c0e5dcbd2b92115cfb1334 (patch)
tree5043b938bdfd715daf231bfa3825d0b51c8c16f3 /etc/inc/util.inc
parent5be3060472b257e0f171669b91d4e407960463e6 (diff)
downloadpfsense-086cf944580b3a62a7c0e5dcbd2b92115cfb1334.zip
pfsense-086cf944580b3a62a7c0e5dcbd2b92115cfb1334.tar.gz
Code style bits and pieces from etc
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 3fafdfb..fa06658 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -434,7 +434,7 @@ function ip_range_size_v4($startip, $endip) {
function find_smallest_cidr_v4($number) {
$smallest = 1;
for ($b=32; $b > 0; $b--) {
- $smallest = ($number <= pow(2,$b)) ? $b : $smallest;
+ $smallest = ($number <= pow(2, $b)) ? $b : $smallest;
}
return (32-$smallest);
}
@@ -813,7 +813,7 @@ function check_subnetsv6_overlap($subnet1, $bits1, $subnet2, $bits2) {
}
/* return true if $addr is in $subnet, false if not */
-function ip_in_subnet($addr,$subnet) {
+function ip_in_subnet($addr, $subnet) {
if (is_ipaddrv6($addr) && is_subnetv6($subnet)) {
return (Net_IPv6::isInNetmask($addr, $subnet));
} else if (is_ipaddrv4($addr) && is_subnetv4($subnet)) {
@@ -1077,7 +1077,7 @@ function get_configured_ip_aliases_list($returnfullentry = false) {
if (is_array($config['virtualip']['vip'])) {
$viparr = &$config['virtualip']['vip'];
foreach ($viparr as $vip) {
- if ($vip['mode']=="ipalias") {
+ if ($vip['mode'] == "ipalias") {
if ($returnfullentry) {
$alias_list[$vip['subnet']] = $vip;
} else {
@@ -1269,7 +1269,7 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "")
$upints = array();
/* get a list of virtual interface types */
if (!$vfaces) {
- $vfaces = array (
+ $vfaces = array(
'bridge',
'ppp',
'pppoe',
@@ -1704,7 +1704,7 @@ function run_plugins($directory) {
foreach ($files as $file) {
if (stristr($file, ".sh") == true) {
mwexec($directory . $file . " start");
- } else if (!is_dir($directory . "/" . $file) && stristr($file,".inc")) {
+ } else if (!is_dir($directory . "/" . $file) && stristr($file, ".inc")) {
require_once($directory . "/" . $file);
}
}
@@ -1839,7 +1839,7 @@ function get_memory() {
$physmem = get_single_sysctl("hw.physmem");
$realmem = get_single_sysctl("hw.realmem");
/* convert from bytes to megabytes */
- return array(($physmem/1048576),($realmem/1048576));
+ return array(($physmem/1048576), ($realmem/1048576));
}
function mute_kernel_msgs() {
@@ -1958,7 +1958,7 @@ function isAjax() {
function timeout($timer = 9) {
while (!isset($key)) {
if ($timer >= 9) {
- echo chr(8) . chr(8) . ($timer==9 ? chr(32) : null) . "{$timer}";
+ echo chr(8) . chr(8) . ($timer == 9 ? chr(32) : null) . "{$timer}";
} else {
echo chr(8). "{$timer}";
}
@@ -2000,7 +2000,7 @@ function msort($array, $id="id", $sort_ascending=true) {
$index++;
}
$temp_array[] = $array[$lowest_id];
- $array = array_merge(array_slice($array, 0,$lowest_id), array_slice($array, $lowest_id+1));
+ $array = array_merge(array_slice($array, 0, $lowest_id), array_slice($array, $lowest_id + 1));
}
if ($sort_ascending) {
return $temp_array;
OpenPOWER on IntegriCloud