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
please sonar: dont apply binary operators to signed ints
[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
97a89a2
..
e854b52
100644
(file)
--- a/
examples/msg/dht-kademlia/node.c
+++ b/
examples/msg/dht-kademlia/node.c
@@
-116,7
+116,7
@@
unsigned int get_id_in_prefix(unsigned int id, unsigned int prefix)
if (prefix == 0) {
return 0;
} else {
- return (1 << (
prefix - 1
)) ^ id;
+ return (1 << (
(unsigned int)(prefix - 1)
)) ^ id;
}
}