A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vacation commit
[simgrid.git]
/
examples
/
msg
/
dht-kademlia
/
node.c
diff --git
a/examples/msg/dht-kademlia/node.c
b/examples/msg/dht-kademlia/node.c
index
385d0d6
..
97a89a2
100644
(file)
--- a/
examples/msg/dht-kademlia/node.c
+++ b/
examples/msg/dht-kademlia/node.c
@@
-127,8
+127,8
@@
unsigned int get_id_in_prefix(unsigned int id, unsigned int prefix)
*/
unsigned int get_node_prefix(unsigned int id, unsigned int nb_bits)
{
*/
unsigned int get_node_prefix(unsigned int id, unsigned int nb_bits)
{
- unsigned int
j,
size = sizeof(unsigned int) * 8;
- for (j = 0; j < size; j++) {
+ unsigned int size = sizeof(unsigned int) * 8;
+ for (
unsigned int
j = 0; j < size; j++) {
if (((id >> (size - 1 - j)) & 0x1) != 0) {
return nb_bits - (j);
}
if (((id >> (size - 1 - j)) & 0x1) != 0) {
return nb_bits - (j);
}