diff options
author | Ermal <eri@pfsense.org> | 2010-03-31 21:16:14 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-03-31 21:16:36 +0000 |
commit | 87f2868788bf7254945650cf58a6230d7bcddd99 (patch) | |
tree | 0895f7d54c4ae776e212c9703ae0167b558229f6 /etc/inc/filter.inc | |
parent | 9af4b31b7ab9a62e559ee097f77e1ccfb44e0964 (diff) | |
download | pfsense-87f2868788bf7254945650cf58a6230d7bcddd99.zip pfsense-87f2868788bf7254945650cf58a6230d7bcddd99.tar.gz |
Micro-optimization, no need to fork here just to get the file contents.
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r-- | etc/inc/filter.inc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index a4b4eea..40b28e1 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -289,8 +289,7 @@ function filter_configure_sync() { $rules_error = exec_command("/sbin/pfctl -f {$g['tmp_path']}/rules.debug"); $line_error = split("\:", $rules_error); $line_number = $line_error[1]; - $rules_file = `/bin/cat {$g['tmp_path']}/rules.debug`; - $line_split = split("\n", $rules_file); + $line_split = file("{$g['tmp_path']}/rules.debug"); if(is_array($line_split)) $line_error = "The line in question reads [{$line_number}]: {$line_split[$line_number-1]}"; if($line_error and $line_number) { |