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
Use type network_element_t instead of void*, and avoid unnecessary casts.
[simgrid.git]
/
src
/
surf
/
surf_routing_full.c
diff --git
a/src/surf/surf_routing_full.c
b/src/surf/surf_routing_full.c
index
bafd2fa
..
acee99d
100644
(file)
--- a/
src/surf/surf_routing_full.c
+++ b/
src/surf/surf_routing_full.c
@@
-161,10
+161,12
@@
void model_full_set_route(AS_t rc, const char *src,
{
network_element_t src_net_elm, dst_net_elm;
- src_net_elm = (network_element_t)xbt_lib_get_or_null(host_lib, src, ROUTING_HOST_LEVEL);
- dst_net_elm = (network_element_t)xbt_lib_get_or_null(host_lib, dst, ROUTING_HOST_LEVEL);
- if(!src_net_elm) src_net_elm = (network_element_t)xbt_lib_get_or_null(as_router_lib, src, ROUTING_ASR_LEVEL);
- if(!dst_net_elm) dst_net_elm = (network_element_t)xbt_lib_get_or_null(as_router_lib, dst, ROUTING_ASR_LEVEL);
+ src_net_elm = xbt_lib_get_or_null(host_lib, src, ROUTING_HOST_LEVEL);
+ dst_net_elm = xbt_lib_get_or_null(host_lib, dst, ROUTING_HOST_LEVEL);
+ if (!src_net_elm)
+ src_net_elm = xbt_lib_get_or_null(as_router_lib, src, ROUTING_ASR_LEVEL);
+ if (!dst_net_elm)
+ dst_net_elm = xbt_lib_get_or_null(as_router_lib, dst, ROUTING_ASR_LEVEL);
xbt_assert(src_net_elm, "Network elements %s not found", src);
xbt_assert(dst_net_elm, "Network elements %s not found", dst);