]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
guardian.cgi: Use variable $pid instead of array element.
authorMatthias Fischer <fischerm@ipfire.org>
Sat, 28 Feb 2015 10:52:33 +0000 (11:52 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 29 Jul 2016 11:17:55 +0000 (13:17 +0200)
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>
html/cgi-bin/guardian.cgi

index 45bc510d263762b0879f66cd0991cb5c13f4417d..ea02e76dfff2e7facdc32b0525c798b6bcad43fb 100644 (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>