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 treats
[simgrid.git]
/
examples
/
msg
/
dht-kademlia
/
node.h
diff --git
a/examples/msg/dht-kademlia/node.h
b/examples/msg/dht-kademlia/node.h
index
9a5eab2
..
0659d7d
100644
(file)
--- a/
examples/msg/dht-kademlia/node.h
+++ b/
examples/msg/dht-kademlia/node.h
@@
-17,7
+17,9
@@
typedef struct s_node_contact {
unsigned int id; //The node identifier
unsigned int distance; //The distance from the node
typedef struct s_node_contact {
unsigned int id; //The node identifier
unsigned int distance; //The distance from the node
-} s_node_contact_t, *node_contact_t;
+} s_node_contact_t;
+
+typedef s_node_contact_t *node_contact_t;
/* Node data */
typedef struct s_node {
/* Node data */
typedef struct s_node {
@@
-26,11
+28,13
@@
typedef struct s_node {
msg_comm_t receive_comm; //current receiving communication.
msg_task_t task_received; //current task being received
msg_comm_t receive_comm; //current receiving communication.
msg_task_t task_received; //current task being received
- char mailbox[MAILBOX_NAME_SIZE
+1
]; //node mailbox
+ char mailbox[MAILBOX_NAME_SIZE]; //node mailbox
unsigned int find_node_success; //Number of find_node which have succeeded.
unsigned int find_node_failed; //Number of find_node which have failed.
unsigned int find_node_success; //Number of find_node which have succeeded.
unsigned int find_node_failed; //Number of find_node which have failed.
-} s_node_t, *node_t;
+} s_node_t;
+
+typedef s_node_t *node_t;
// node functions
node_t node_init(unsigned int id);
// node functions
node_t node_init(unsigned int id);