From c3b56025c82ad6f22be85d2986081667d9a2eb92 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 30 Mar 2013 16:22:05 +0000 Subject: -cleanup --- src/ats/gnunet-service-ats_addresses.c | 7 ++++++- src/transport/gnunet-service-transport_manipulation.c | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index 863b7cc40..acf550196 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c @@ -252,6 +252,7 @@ enum ATS_Mode MODE_MLP }; + /** * Pending Address suggestion requests */ @@ -273,6 +274,7 @@ struct GAS_Addresses_Suggestion_Requests struct GNUNET_PeerIdentity id; }; + /** * Handle for ATS address component */ @@ -378,7 +380,9 @@ static unsigned int assemble_ats_information (const struct ATS_Address *aa, struct GNUNET_ATS_Information **dest) { unsigned int ats_count = GNUNET_ATS_PropertyCount - 1; - struct GNUNET_ATS_Information *ats = GNUNET_malloc (ats_count * sizeof (struct GNUNET_ATS_Information)); + struct GNUNET_ATS_Information *ats; + + ats = GNUNET_malloc (ats_count * sizeof (struct GNUNET_ATS_Information)); (*dest) = ats; ats[0].type = ntohl(GNUNET_ATS_UTILIZATION_UP); @@ -400,6 +404,7 @@ assemble_ats_information (const struct ATS_Address *aa, struct GNUNET_ATS_Infor return ats_count; } + /** * Disassemble ATS information and update address * diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c index ffb9a0ecd..a51e9da4e 100644 --- a/src/transport/gnunet-service-transport_manipulation.c +++ b/src/transport/gnunet-service-transport_manipulation.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2010,2011 Christian Grothoff (and other contributing authors) + (C) 2010-2013 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -496,9 +496,11 @@ GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg) man_handle.peers = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); } -int free_tmps (void *cls, - const struct GNUNET_HashCode * key, - void *value) + +static int +free_tmps (void *cls, + const struct GNUNET_HashCode * key, + void *value) { struct DelayQueueEntry *dqe; struct DelayQueueEntry *next; -- cgit v1.2.3