From 42af77bb80a8188f24529334fd9ec0774db5c8d5 Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Mon, 16 Aug 2010 17:52:00 +0300 Subject: [PATCH] ControlScripts: fix matrix indexes in for constructs in parse_up_down_log.sh --- ControlScripts/parse_up_down_log.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ControlScripts/parse_up_down_log.sh b/ControlScripts/parse_up_down_log.sh index 8b78628..2ad8cea 100755 --- a/ControlScripts/parse_up_down_log.sh +++ b/ControlScripts/parse_up_down_log.sh @@ -97,8 +97,8 @@ BEGIN { } close("peer_index.cfg"); - for (i = 0; i < num_peers; i++) - for (j = 0; j < num_peers; j++) { + for (i = 1; i <= num_peers; i++) + for (j = 1; j <= num_peers; j++) { down_matrix[i,j] = 0; up_matrix[i,j] = 0; } @@ -123,8 +123,8 @@ BEGIN { } END { - for (i = 0; i < num_peers; i++) { - for (j = 0; j < num_peers; j++) { + for (i = 1; i <= num_peers; i++) { + for (j = 1; j <= num_peers; j++) { if (down_matrix[i,j] == 0) printf "0 " >> down_output_file; else -- 2.20.1