From b70a00756b53bbbbd008ead49c8bf00474807a00 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 Apr 2012 12:37:19 +0000 Subject: [PATCH] -LRN: misc patches / fixes --- src/ats/perf_ats_mlp.c | 2 +- src/ats/test_ats_mlp.c | 2 +- src/ats/test_ats_mlp_averaging.c | 2 +- src/integration-tests/connection_watchdog.c | 2 +- src/namestore/gnunet-service-namestore.c | 2 +- src/namestore/namestore_api.c | 2 +- src/transport/plugin_transport_unix.c | 2 +- src/util/service.c | 2 +- src/util/test_service.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ats/perf_ats_mlp.c b/src/ats/perf_ats_mlp.c index 914534db0..306ef422d 100644 --- a/src/ats/perf_ats_mlp.c +++ b/src/ats/perf_ats_mlp.c @@ -258,7 +258,7 @@ check (void *cls, char *const *args, const char *cfgfile, /* Setting address */ a[ca].peer = p[c].id; - a[ca].plugin = strdup("test"); + a[ca].plugin = GNUNET_strdup("test"); a[ca].atsp_network_type = GNUNET_ATS_NET_LOOPBACK; a[ca].ats = GNUNET_malloc (DEF_ATS_VALUES * sizeof (struct GNUNET_ATS_Information)); diff --git a/src/ats/test_ats_mlp.c b/src/ats/test_ats_mlp.c index 4e8a68591..27e5360b3 100644 --- a/src/ats/test_ats_mlp.c +++ b/src/ats/test_ats_mlp.c @@ -52,7 +52,7 @@ create_address (struct ATS_Address *addr, char * plugin, int ats_count, struct G addr->mlp_information = NULL; addr->next = NULL; addr->prev = NULL; - addr->plugin = strdup (plugin); + addr->plugin = GNUNET_strdup (plugin); addr->ats_count = ats_count; addr->ats = ats; } diff --git a/src/ats/test_ats_mlp_averaging.c b/src/ats/test_ats_mlp_averaging.c index d9a46f68d..5eea44631 100644 --- a/src/ats/test_ats_mlp_averaging.c +++ b/src/ats/test_ats_mlp_averaging.c @@ -52,7 +52,7 @@ create_address (struct ATS_Address *addr, char * plugin, int ats_count, struct G addr->mlp_information = NULL; addr->next = NULL; addr->prev = NULL; - addr->plugin = strdup (plugin); + addr->plugin = GNUNET_strdup (plugin); addr->ats_count = ats_count; addr->ats = ats; } diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index 942059c91..242322bb6 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c @@ -983,7 +983,7 @@ init () GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Transport plugin: `%s' port %llu\n"), pos, port); cur = GNUNET_malloc(sizeof (struct TransportPlugin)); - cur->short_name = strdup (pos); + cur->short_name = GNUNET_strdup (pos); cur->port = port; if (0 == strcmp("tcp", pos)) { diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 7facd5e39..7fd8d7dc4 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -1529,7 +1529,7 @@ void zone_iteraterate_proc (void *cls, rd_filtered = NULL; } proc->rd = rd_filtered; - proc->name = strdup(name); + proc->name = GNUNET_strdup(name); memcpy (&proc->zone_key, zone_key, sizeof (proc->zone_key)); /* Signature */ diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index b965ebefb..8c55e13a4 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c @@ -1428,7 +1428,7 @@ GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h, msg->zone = *zone; msg->value_zone = *value_zone; - char * z_tmp = strdup (GNUNET_short_h2s (zone)); + char * z_tmp = GNUNET_strdup (GNUNET_short_h2s (zone)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for zone `%s' in zone `%s'\n", "NAMESTORE_ZONE_TO_NAME", z_tmp, diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 04c8a45be..ecfe15783 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -1003,7 +1003,7 @@ unix_string_to_address (void *cls, const char *addr, uint16_t addrlen, return GNUNET_SYSERR; } - (*buf) = strdup (addr); + (*buf) = GNUNET_strdup (addr); (*added) = strlen (addr) + 1; return GNUNET_OK; } diff --git a/src/util/service.c b/src/util/service.c index 3cddae69e..fb9830419 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -1179,7 +1179,7 @@ receive_sockets_from_parent (struct GNUNET_SERVICE_Context *sctx) */ lsocks_pipe = (HANDLE) strtoul (env_buf, NULL, 10); if ( (0 == lsocks_pipe) || (INVALID_HANDLE_VALUE == lsocks_pipe)) - return GNUNET_NO + return GNUNET_NO; fail = 1; do { diff --git a/src/util/test_service.c b/src/util/test_service.c index 9565e0931..078be7a41 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c @@ -61,7 +61,7 @@ static void ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { const struct GNUNET_CONFIGURATION_Handle *cfg = cls; - struct GNUNET_CLIENT_Connection *client; + GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service confirmed running\n"); -- 2.25.1