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
[sonar] Constify pointer and reference parameters in examples/deprecated/.
[simgrid.git]
/
examples
/
deprecated
/
msg
/
dht-kademlia
/
routing_table.c
diff --git
a/examples/deprecated/msg/dht-kademlia/routing_table.c
b/examples/deprecated/msg/dht-kademlia/routing_table.c
index
5672b26
..
68d2661
100644
(file)
--- a/
examples/deprecated/msg/dht-kademlia/routing_table.c
+++ b/
examples/deprecated/msg/dht-kademlia/routing_table.c
@@
-43,7
+43,7
@@
unsigned int routing_table_contains(routing_table_t table, unsigned int node_id)
}
/**@brief prints the routing table, to debug stuff. */
}
/**@brief prints the routing table, to debug stuff. */
-void routing_table_print(routing_table_t table)
+void routing_table_print(
const_
routing_table_t table)
{
unsigned int j;
unsigned int value;
{
unsigned int j;
unsigned int value;
@@
-63,7
+63,7
@@
void routing_table_print(routing_table_t table)
* @param bucket the bucket in which we try to find our identifier
* @param id the id
*/
* @param bucket the bucket in which we try to find our identifier
* @param id the id
*/
-unsigned int bucket_find_id(bucket_t bucket, unsigned int id)
+unsigned int bucket_find_id(
const_
bucket_t bucket, unsigned int id)
{
unsigned int i;
unsigned int current_id;
{
unsigned int i;
unsigned int current_id;
@@
-76,7
+76,7
@@
unsigned int bucket_find_id(bucket_t bucket, unsigned int id)
}
/** Returns if the bucket contains an identifier. */
}
/** Returns if the bucket contains an identifier. */
-unsigned int bucket_contains(bucket_t bucket, unsigned int id)
+unsigned int bucket_contains(
const_
bucket_t bucket, unsigned int id)
{
return xbt_dynar_member(bucket->nodes, &id);
}
{
return xbt_dynar_member(bucket->nodes, &id);
}
@@
-86,7
+86,7
@@
unsigned int bucket_contains(bucket_t bucket, unsigned int id)
* @param id the identifier
* @return the bucket in which the the identifier would be.
*/
* @param id the identifier
* @return the bucket in which the the identifier would be.
*/
-bucket_t routing_table_find_bucket(routing_table_t table, unsigned int id)
+bucket_t routing_table_find_bucket(
const_
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);