guardian.cgi: Use variable $pid instead of array element.

This will prevent from a lot of perl suggestions in the
apache error log.

Reference #10748.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Matthias Fischer
2015-02-28 11:52:33 +01:00
committed by Stefan Schantl
parent bfb860ceb7
commit 922ddf0ef6

View File

@@ -84,7 +84,7 @@ my $errormessage = '';
# Check if guardian is running and grab some stats.
&daemonstats();
my $pid = @pid[0];
my $pid = $pid[0];
## Perform input checks and save settings.
#
@@ -312,7 +312,7 @@ sub showMainBox() {
# Get current status of guardian.
&daemonstats();
$pid = @pid[0];
$pid = $pid[0];
# Display some useful information related to guardian, if daemon is running.
if ( ($memory != 0) && ($pid > 0) ){
@@ -332,7 +332,7 @@ sub showMainBox() {
</tr>
<tr>
<td class='base'></td>
<td bgcolor='$color{'color22'}' align='center'>@pid[0]</td>
<td bgcolor='$color{'color22'}' align='center'>$pid</td>
<td bgcolor='$color{'color22'}' align='center'>$memory KB</td>
</tr>
</table>