diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-09-04 13:02:48 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-09-04 13:02:48 +0000 |
commit | c2d3571c01ea165992de8d14f3279730a52b8b3b (patch) | |
tree | 59ba46363933f51ac00cce18bcc866aad68e7a5d /src/mesh | |
parent | 15744c5391a5ff0ea866d8689e62ad3ecfd3a5d4 (diff) | |
download | gnunet-c2d3571c01ea165992de8d14f3279730a52b8b3b.tar.gz gnunet-c2d3571c01ea165992de8d14f3279730a52b8b3b.zip |
- make sure -1LL is consistently used everywhere, document
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index e9b931e17..ec2925dd4 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -3550,7 +3550,7 @@ tunnel_get_child_fwd_ack (void *cls, | |||
3550 | * | 3550 | * |
3551 | * @param t Tunnel. | 3551 | * @param t Tunnel. |
3552 | * | 3552 | * |
3553 | * @return Maximum PID allowed (uint32 MAX), -1 if node has no children. | 3553 | * @return Maximum PID allowed (uint32 MAX), -1LL if node has no children. |
3554 | */ | 3554 | */ |
3555 | static int64_t | 3555 | static int64_t |
3556 | tunnel_get_children_fwd_ack (struct MeshTunnel *t) | 3556 | tunnel_get_children_fwd_ack (struct MeshTunnel *t) |
@@ -3607,7 +3607,7 @@ tunnel_set_client_fwd_ack (struct MeshTunnel *t, | |||
3607 | * @param t Tunnel on which to look. | 3607 | * @param t Tunnel on which to look. |
3608 | * | 3608 | * |
3609 | * @return Corresponding ACK value (max uint32_t). | 3609 | * @return Corresponding ACK value (max uint32_t). |
3610 | * If no clients are suscribed, -1. | 3610 | * If no clients are suscribed, -1LL. |
3611 | */ | 3611 | */ |
3612 | static int64_t | 3612 | static int64_t |
3613 | tunnel_get_clients_fwd_ack (struct MeshTunnel *t) | 3613 | tunnel_get_clients_fwd_ack (struct MeshTunnel *t) |
@@ -3622,9 +3622,9 @@ tunnel_get_clients_fwd_ack (struct MeshTunnel *t) | |||
3622 | return -1LL; | 3622 | return -1LL; |
3623 | } | 3623 | } |
3624 | 3624 | ||
3625 | for (ack = -1, i = 0; i < t->nclients; i++) | 3625 | for (ack = -1LL, i = 0; i < t->nclients; i++) |
3626 | { | 3626 | { |
3627 | if (-1 == ack || | 3627 | if (-1LL == ack || |
3628 | (GNUNET_YES == t->speed_min && | 3628 | (GNUNET_YES == t->speed_min && |
3629 | GNUNET_YES == GMC_is_pid_bigger (ack, t->clients_fc[i].fwd_ack)) || | 3629 | GNUNET_YES == GMC_is_pid_bigger (ack, t->clients_fc[i].fwd_ack)) || |
3630 | (GNUNET_NO == t->speed_min && | 3630 | (GNUNET_NO == t->speed_min && |
@@ -3666,7 +3666,7 @@ tunnel_get_fwd_ack (struct MeshTunnel *t) | |||
3666 | if (-1LL == child_ack) | 3666 | if (-1LL == child_ack) |
3667 | { | 3667 | { |
3668 | // Node has no children, child_ack AND core buffer are irrelevant. | 3668 | // Node has no children, child_ack AND core buffer are irrelevant. |
3669 | GNUNET_break (-1 != client_ack); // No children AND no clients? Not good! | 3669 | GNUNET_break (-1LL != client_ack); // No children AND no clients? Not good! |
3670 | return (uint32_t) client_ack; | 3670 | return (uint32_t) client_ack; |
3671 | } | 3671 | } |
3672 | if (-1LL == client_ack) | 3672 | if (-1LL == client_ack) |