summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-06-15 14:19:11 +0545
committerPhil Davis <phil.davis@inf.org>2015-06-15 14:19:11 +0545
commit6c07db487164262f9191ad02805523bd153e0ba6 (patch)
tree0c266356179ac730233a16c0e3767a0c22514c4d /etc/inc/util.inc
parent67d9685607eef7c679fda929ad4855be1b2f9dec (diff)
downloadpfsense-6c07db487164262f9191ad02805523bd153e0ba6.zip
pfsense-6c07db487164262f9191ad02805523bd153e0ba6.tar.gz
Code spacing
and other random stuff I noticed. I think this finishes messing with code style. The codebase should match the developer style guide closely enough that 99.9% of changes will not feel the need to also massage the formatting.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 2cbfce4..169f784 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -762,7 +762,7 @@ function subnet_expand($subnet) {
function subnetv4_expand($subnet) {
$result = array();
list ($ip, $bits) = explode("/", $subnet);
- $net = ip2long($ip);
+ $net = ip2long($ip);
$mask = (0xffffffff << (32 - $bits));
$net &= $mask;
$size = round(exp(log(2) * (32 - $bits)));
@@ -1064,7 +1064,7 @@ function get_configured_carp_interface_list($carpinterface = '', $family = 'inet
function get_configured_ip_aliases_list($returnfullentry = false) {
global $config;
- $alias_list=array();
+ $alias_list = array();
if (is_array($config['virtualip']['vip'])) {
$viparr = &$config['virtualip']['vip'];
@@ -1086,7 +1086,7 @@ function get_configured_ip_aliases_list($returnfullentry = false) {
function get_configured_vips_list() {
global $config;
- $alias_list=array();
+ $alias_list = array();
if (is_array($config['virtualip']['vip'])) {
$viparr = &$config['virtualip']['vip'];
@@ -1708,7 +1708,7 @@ function run_plugins($directory) {
* safe_mkdir($path, $mode = 0755)
* create directory if it doesn't already exist and isn't a file!
*/
-function safe_mkdir($path, $mode=0755) {
+function safe_mkdir($path, $mode = 0755) {
global $g;
if (!is_file($path) && !is_dir($path)) {
@@ -1951,7 +1951,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}";
}
@@ -1977,11 +1977,11 @@ function timeout($timer = 9) {
* RESULT
* returns newly sorted array
******/
-function msort($array, $id="id", $sort_ascending=true) {
+function msort($array, $id = "id", $sort_ascending = true) {
$temp_array = array();
while (count($array)>0) {
$lowest_id = 0;
- $index=0;
+ $index = 0;
foreach ($array as $item) {
if (isset($item[$id])) {
if ($array[$lowest_id][$id]) {
OpenPOWER on IntegriCloud