From: Razvan Deaconescu Date: Mon, 16 Aug 2010 14:52:00 +0000 (+0300) Subject: ControlScripts: fix matrix indexes in for constructs in parse_up_down_log.sh X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=42af77bb80a8188f24529334fd9ec0774db5c8d5;p=p2p-testing-infrastructure.git ControlScripts: fix matrix indexes in for constructs in parse_up_down_log.sh --- 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