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
cosmetics: use explicitly 'not' instead of a raw !
[simgrid.git]
/
teshsuite
/
msg
/
app-bittorrent
/
bittorrent-peer.c
diff --git
a/teshsuite/msg/app-bittorrent/bittorrent-peer.c
b/teshsuite/msg/app-bittorrent/bittorrent-peer.c
index
f74cdf3
..
69818a5
100644
(file)
--- a/
teshsuite/msg/app-bittorrent/bittorrent-peer.c
+++ b/
teshsuite/msg/app-bittorrent/bittorrent-peer.c
@@
-591,7
+591,7
@@
void update_choked_peers(peer_t peer)
// remove a peer from the list
xbt_dict_cursor_t cursor = NULL;
xbt_dict_cursor_first(peer->active_peers, &cursor);
// remove a peer from the list
xbt_dict_cursor_t cursor = NULL;
xbt_dict_cursor_first(peer->active_peers, &cursor);
- if (
xbt_dict_length(peer->active_peers) > 0
) {
+ if (
not xbt_dict_is_empty(peer->active_peers)
) {
key_choked = xbt_dict_cursor_get_key(cursor);
peer_choked = xbt_dict_cursor_get_data(cursor);
}
key_choked = xbt_dict_cursor_get_key(cursor);
peer_choked = xbt_dict_cursor_get_data(cursor);
}