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
Prefix is unsigned and can't be negative.
[simgrid.git]
/
examples
/
msg
/
dht-kademlia
/
routing_table.c
diff --git
a/examples/msg/dht-kademlia/routing_table.c
b/examples/msg/dht-kademlia/routing_table.c
index
d39741e
..
f0d6a6e
100644
(file)
--- a/
examples/msg/dht-kademlia/routing_table.c
+++ b/
examples/msg/dht-kademlia/routing_table.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2012-201
6
. The SimGrid Team.
+/* Copyright (c) 2012-201
7
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-90,7
+90,7
@@
bucket_t routing_table_find_bucket(routing_table_t table, unsigned int id)
{
unsigned int xor_number = table->id ^ id;
unsigned int prefix = get_node_prefix(xor_number, identifier_size);
{
unsigned int xor_number = table->id ^ id;
unsigned int prefix = get_node_prefix(xor_number, identifier_size);
- xbt_assert(prefix
>= 0 && prefix
<= identifier_size, "Tried to return a bucket that doesn't exist.");
+ xbt_assert(prefix <= identifier_size, "Tried to return a bucket that doesn't exist.");
bucket_t bucket = &table->buckets[prefix];
return bucket;
}
bucket_t bucket = &table->buckets[prefix];
return bucket;
}