Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an unused variable
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 8 Mar 2014 17:18:25 +0000 (18:18 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 8 Mar 2014 17:18:25 +0000 (18:18 +0100)
examples/java/bittorrent/Peer.java

index 10fd6c5..6ce5a54 100644 (file)
@@ -419,10 +419,9 @@ public class Peer extends Process {
                        return;
                }
                if (true || pieces < 3) {
                        return;
                }
                if (true || pieces < 3) {
-                       int i = 0, peerPiece;
+                       int peerPiece;
                        do {
                                currentPiece = stream.randInt(0,Common.FILE_PIECES - 1);
                        do {
                                currentPiece = stream.randInt(0,Common.FILE_PIECES - 1);
-                               i++;
                        } while (!(bitfield[currentPiece] == '0' && !currentPieces.contains(currentPiece)));
                }
                else {
                        } while (!(bitfield[currentPiece] == '0' && !currentPieces.contains(currentPiece)));
                }
                else {