[Logcheck-commits] r1613 - logcheck/branches/zugschlus200707/src

zugschlus at users.alioth.debian.org zugschlus at users.alioth.debian.org
Fri Jul 27 17:43:26 UTC 2007


Author: zugschlus
Date: 2007-07-27 17:43:26 +0000 (Fri, 27 Jul 2007)
New Revision: 1613

Modified:
   logcheck/branches/zugschlus200707/src/logtail2
Log:
coding style issues



Modified: logcheck/branches/zugschlus200707/src/logtail2
===================================================================
--- logcheck/branches/zugschlus200707/src/logtail2	2007-07-27 17:34:26 UTC (rev 1612)
+++ logcheck/branches/zugschlus200707/src/logtail2	2007-07-27 17:43:26 UTC (rev 1613)
@@ -72,7 +72,7 @@
     my ($filename) = @_;
     my $mtime = 0;
     if (-e "$filename") {
-      unless ((undef,undef,undef,undef,undef,undef,undef,undef,undef,$mtime) = stat "$filename") {
+      unless ($mtime = (stat($filename)[8])) {
           print STDERR "Cannot get $filename mtime.\n";
           exit 65;
       }
@@ -84,7 +84,7 @@
     my ($filename) = @_;
     my $inode = 0;
     if (-e "$filename") {
-      unless ((undef,$inode) = stat $filename) {
+      unless ($inode = (stat($filename)[1])) {
           print STDERR "Cannot get $filename inode.\n";
           exit 65;
       }
@@ -152,11 +152,11 @@
     # If offset file exists, open and parse it.
     if (open(OFFSET, $offsetfile)) {
         $_ = <OFFSET>;
-        unless (! defined $_) {
+        if (defined $_) {
        	    chomp $_;
 	    $inode = $_;
 	    $_ = <OFFSET>;
-	    unless (! defined $_) {
+	    if (defined $_) {
 	        chomp $_;
 	        $offset = $_;
 	    }
@@ -164,7 +164,7 @@
     }
     
     # determine log file inode and size
-    unless ((undef,$ino,undef,undef,undef,undef,undef,$size) = stat $logfile) {
+    unless ((undef,$ino,undef,undef,undef,undef,undef,$size) = stat($logfile)) {
         print STDERR "Cannot get $logfile file size.\n";
         exit 65;
     }




More information about the Logcheck-commits mailing list