From fed172b6ccffc79e8415bb4e8a35984209a32ea2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 19 Mar 2010 09:14:23 +0000 Subject: [PATCH] fix for 32-bit size_t negation --- src/transport/gnunet-service-transport.c | 8 ++++---- src/transport/plugin_transport_tcp.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index e993cc706..a2190535c 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -1072,7 +1072,7 @@ transmit_send_continuation (void *cls, GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes pending with plugins"), - -mq->message_buf_size, + - (int64_t) mq->message_buf_size, GNUNET_NO); if (result == GNUNET_OK) { @@ -1278,7 +1278,7 @@ try_transmission_to_peer (struct NeighbourList *neighbour) #endif GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes in message queue for other peers"), - -mq->message_buf_size, + - (int64_t) mq->message_buf_size, GNUNET_NO); GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes discarded (no destination address available)"), @@ -1334,7 +1334,7 @@ try_transmission_to_peer (struct NeighbourList *neighbour) #endif GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes in message queue for other peers"), - -mq->message_buf_size, + - (int64_t) mq->message_buf_size, GNUNET_NO); GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes pending with plugins"), @@ -2904,7 +2904,7 @@ disconnect_neighbour (struct NeighbourList *n, int check) { GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes in message queue for other peers"), - -mq->message_buf_size, + - (int64_t) mq->message_buf_size, GNUNET_NO); GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes discarded due to disconnect"), diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 2e1d02257..48ad370fa 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -376,7 +376,7 @@ do_transmit (void *cls, size_t size, void *buf) #endif GNUNET_STATISTICS_update (session->plugin->env->stats, gettext_noop ("# bytes currently in TCP buffers"), - -pm->message_size, + - (int64_t) pm->message_size, GNUNET_NO); GNUNET_STATISTICS_update (session->plugin->env->stats, gettext_noop ("# bytes discarded by TCP (timeout)"), @@ -404,7 +404,7 @@ do_transmit (void *cls, size_t size, void *buf) pm); GNUNET_STATISTICS_update (session->plugin->env->stats, gettext_noop ("# bytes currently in TCP buffers"), - -pm->message_size, + - (int64_t) pm->message_size, GNUNET_NO); if (pm->transmit_cont != NULL) pm->transmit_cont (pm->transmit_cont_cls, @@ -504,7 +504,7 @@ disconnect_session (struct Session *session) #endif GNUNET_STATISTICS_update (session->plugin->env->stats, gettext_noop ("# bytes currently in TCP buffers"), - -pm->message_size, + - (int64_t) pm->message_size, GNUNET_NO); GNUNET_STATISTICS_update (session->plugin->env->stats, gettext_noop ("# bytes discarded by TCP (disconnect)"), -- 2.25.1