From c2d3571c01ea165992de8d14f3279730a52b8b3b Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 4 Sep 2012 13:02:48 +0000 Subject: - make sure -1LL is consistently used everywhere, document --- src/mesh/gnunet-service-mesh.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesh') 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, * * @param t Tunnel. * - * @return Maximum PID allowed (uint32 MAX), -1 if node has no children. + * @return Maximum PID allowed (uint32 MAX), -1LL if node has no children. */ static int64_t tunnel_get_children_fwd_ack (struct MeshTunnel *t) @@ -3607,7 +3607,7 @@ tunnel_set_client_fwd_ack (struct MeshTunnel *t, * @param t Tunnel on which to look. * * @return Corresponding ACK value (max uint32_t). - * If no clients are suscribed, -1. + * If no clients are suscribed, -1LL. */ static int64_t tunnel_get_clients_fwd_ack (struct MeshTunnel *t) @@ -3622,9 +3622,9 @@ tunnel_get_clients_fwd_ack (struct MeshTunnel *t) return -1LL; } - for (ack = -1, i = 0; i < t->nclients; i++) + for (ack = -1LL, i = 0; i < t->nclients; i++) { - if (-1 == ack || + if (-1LL == ack || (GNUNET_YES == t->speed_min && GNUNET_YES == GMC_is_pid_bigger (ack, t->clients_fc[i].fwd_ack)) || (GNUNET_NO == t->speed_min && @@ -3666,7 +3666,7 @@ tunnel_get_fwd_ack (struct MeshTunnel *t) if (-1LL == child_ack) { // Node has no children, child_ack AND core buffer are irrelevant. - GNUNET_break (-1 != client_ack); // No children AND no clients? Not good! + GNUNET_break (-1LL != client_ack); // No children AND no clients? Not good! return (uint32_t) client_ack; } if (-1LL == client_ack) -- cgit v1.2.3