andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
Blob Blame History Raw
From 179b741ca8c2936504f653c1b81c8f8f38adc341 Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins@redhat.com>
Date: Tue, 2 Jul 2013 14:38:49 -0600
Subject: [PATCH 134/225] Ticket #47387 - improve logconv.pl performance with
 large access logs

https://fedorahosted.org/389/ticket/47387
Reviewed by: mreynolds (Thanks!)
Branch: master
Fix Description: Fix some additional uninitialized variable warnings
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 8a23f5e0af41291d28c4ce7251d9bb2e94a5994c)
(cherry picked from commit 7a107bdb67dad58728977b3f410df1d94c6cdb91)
(cherry picked from commit 34468104d63f6d439ff2ed8bc0b9afa2751b5b0a)
(cherry picked from commit 0163575f154d14c0abd87da7bd7e5f736b2e9e8b)
---
 ldap/admin/src/logconv.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index b628d03..ec0fdf5 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -673,7 +673,7 @@ if ($verb eq "yes" || $usage =~ /u/){
 
 		my $notesCount = "1";
 		my $unindexedIp;
-		for (my $n = 0; $n <= scalar(@{$notesEtime}); $n++){
+		for (my $n = 0; $n < scalar(@{$notesEtime}); $n++){
 			if($conn_hash->{$notesConn->[$n]} eq ""){
 				$unindexedIp = "?";
 			} else {
@@ -726,7 +726,7 @@ if ($verb eq "yes" || $usage =~ /u/){
 
 		my $notesCount = "1";
 		my $unindexedIp;
-		for (my $n = 0; $n <= scalar(@{$notesEtime}); $n++){
+		for (my $n = 0; $n < scalar(@{$notesEtime}); $n++){
 			if($conn_hash->{$notesConn->[$n]} eq ""){
 				$unindexedIp = "?";
 			} else {
@@ -1821,7 +1821,7 @@ sub parseLineNormal
 		        $con = $1;
 		        if ($_ =~ /op= *([0-9]+)/i){ $op = $1;}
 		}
-		for (my $i=0; $i <= $vlvCount;$i++){
+		for (my $i=0; $i < $vlvCount;$i++){
 		        if ($vlvconn[$i] eq $con && $vlvop[$i] eq $op){ $vlvNotesACount++; $isVlvNotes="1";}
 		}
 		if($isVlvNotes == 0){
@@ -1846,7 +1846,7 @@ sub parseLineNormal
 		        $con = $1;
 		        if ($_ =~ /op= *([0-9]+)/i){ $op = $1;}
 		}
-		for (my $i=0; $i <= $vlvCount;$i++){
+		for (my $i=0; $i < $vlvCount;$i++){
 		        if ($vlvconn[$i] eq $con && $vlvop[$i] eq $op){ $vlvNotesUCount++; $isVlvNotes="1";}
 		}
 		if($isVlvNotes == 0){
-- 
1.8.1.4