Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an unused variable
[simgrid.git] / examples / java / bittorrent / Peer.java
index f1f10c1..6ce5a54 100644 (file)
@@ -1,10 +1,9 @@
-/*
- * Copyright (c) 2006-2013. The SimGrid Team.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. 
- */
+/* Copyright (c) 2006-2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 package bittorrent;
 
 import java.util.ArrayList;
@@ -420,10 +419,9 @@ public class Peer extends Process {
                        return;
                }
                if (true || pieces < 3) {
-                       int i = 0, peerPiece;
+                       int peerPiece;
                        do {
                                currentPiece = stream.randInt(0,Common.FILE_PIECES - 1);
-                               i++;
                        } while (!(bitfield[currentPiece] == '0' && !currentPieces.contains(currentPiece)));
                }
                else {