From ecdc64b5af16246777bb2a4cab79e203fe462a66 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 25 Nov 2011 22:15:37 +0000 Subject: LRN: Use GNUNET_strdup() instead of strdup () --- src/transport/plugin_transport_wlan.c | 2 +- src/transport/test_quota_compliance.c | 8 ++++---- src/transport/test_transport_api.c | 14 +++++++------- src/transport/test_transport_api_bidirectional_connect.c | 14 +++++++------- src/transport/test_transport_api_disconnect.c | 14 +++++++------- src/transport/test_transport_api_limited_sockets.c | 2 +- src/transport/test_transport_api_reliability.c | 8 ++++---- src/transport/test_transport_api_restart_1peer.c | 14 +++++++------- src/transport/test_transport_api_restart_2peers.c | 14 +++++++------- src/transport/test_transport_api_timeout.c | 4 ++-- src/transport/test_transport_api_unreliability.c | 2 +- src/transport/test_transport_api_unreliability_constant.c | 2 +- src/transport/test_transport_testing.c | 4 ++-- 13 files changed, 51 insertions(+), 51 deletions(-) (limited to 'src/transport') diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 5d81d0afa..ae6af96f8 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c @@ -1482,7 +1482,7 @@ wlan_transport_start_wlan_helper (struct Plugin *plugin) { if (GNUNET_OS_check_helper_binary (filenameloopback) == GNUNET_YES) { - absolute_filename = strdup (filenameloopback); + absolute_filename = GNUNET_strdup (filenameloopback); } else { diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index f4bc6fc54..bb33be1e8 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c @@ -277,7 +277,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, if (ntohl (hdr->num) % 5000 == 0) { struct PeerContext *p = cls; - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%s') got message %u of size %u from peer (`%s')\n", @@ -331,7 +331,7 @@ notify_ready (void *cls, size_t size, void *buf) if (n % 5000 == 0) { - char *receiver_s = strdup (GNUNET_i2s (&receiver->id)); + char *receiver_s = GNUNET_strdup (GNUNET_i2s (&receiver->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending message of size %u from peer %u (`%4s') -> peer %u (`%s') !\n", @@ -429,7 +429,7 @@ measure (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); @@ -462,7 +462,7 @@ start_cb (struct PeerContext *p, void *cls) sender = p2; receiver = p1; - char *sender_c = strdup (GNUNET_i2s (&sender->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&sender->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to send from %u (%s) -> peer %u (%s)\n", sender->no, diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index a04017019..dd0704231 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -151,7 +151,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", @@ -200,7 +200,7 @@ notify_ready (void *cls, size_t size, void *buf) hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); hdr->type = htons (MTYPE); } - char *ps = strdup (GNUNET_i2s (&p2->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", @@ -218,7 +218,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; - char *receiver_s = strdup (GNUNET_i2s (&p1->id)); + char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", @@ -247,7 +247,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, @@ -260,7 +260,7 @@ static void notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) { struct PeerContext *p = cls; - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, @@ -275,7 +275,7 @@ static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { cc = NULL; - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); @@ -299,7 +299,7 @@ start_cb (struct PeerContext *p, void *cls) if (started != 2) return; - char *sender_c = strdup (GNUNET_i2s (&p1->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c index bf8de42e9..aa6f98027 100644 --- a/src/transport/test_transport_api_bidirectional_connect.c +++ b/src/transport/test_transport_api_bidirectional_connect.c @@ -150,7 +150,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", @@ -199,7 +199,7 @@ notify_ready (void *cls, size_t size, void *buf) hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); hdr->type = htons (MTYPE); } - char *ps = strdup (GNUNET_i2s (&p2->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", @@ -217,7 +217,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; - char *receiver_s = strdup (GNUNET_i2s (&p1->id)); + char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", @@ -246,7 +246,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, @@ -259,7 +259,7 @@ static void notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) { struct PeerContext *p = cls; - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, @@ -284,7 +284,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc1); } - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); @@ -306,7 +306,7 @@ start_cb (struct PeerContext *p, void *cls) if (started != 2) return; - char *sender_c = strdup (GNUNET_i2s (&p1->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') <-> peer %u (`%s')\n", diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c index 703de2a5b..7dd9bd913 100644 --- a/src/transport/test_transport_api_disconnect.c +++ b/src/transport/test_transport_api_disconnect.c @@ -154,7 +154,7 @@ static void notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) { struct PeerContext *p = cls; - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, @@ -202,7 +202,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", @@ -246,7 +246,7 @@ notify_ready (void *cls, size_t size, void *buf) hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); hdr->type = htons (MTYPE); } - char *ps = strdup (GNUNET_i2s (&p2->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", @@ -264,7 +264,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; - char *receiver_s = strdup (GNUNET_i2s (&p1->id)); + char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", @@ -293,7 +293,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, @@ -306,7 +306,7 @@ static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { cc = NULL; - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); @@ -330,7 +330,7 @@ start_cb (struct PeerContext *p, void *cls) if (started != 2) return; - char *sender_c = strdup (GNUNET_i2s (&p1->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index f165a5771..7fb13e261 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c @@ -217,7 +217,7 @@ static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { cc = NULL; - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %s <-> %s\n", p1_c, GNUNET_i2s (&p2->id)); diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 7b0b92078..15fc4f6b9 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c @@ -252,7 +252,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, if (ntohl (hdr->num) % 5000 == 0) { struct PeerContext *p = cls; - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%s') got message %u of size %u from peer (`%s')\n", @@ -319,7 +319,7 @@ notify_ready (void *cls, size_t size, void *buf) if (n % 5000 == 0) { - char *receiver_s = strdup (GNUNET_i2s (&receiver->id)); + char *receiver_s = GNUNET_strdup (GNUNET_i2s (&receiver->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending message of size %u from peer %u (`%4s') -> peer %u (`%s') !\n", @@ -394,7 +394,7 @@ sendtask () static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); @@ -432,7 +432,7 @@ start_cb (struct PeerContext *p, void *cls) sender = p2; receiver = p1; - char *sender_c = strdup (GNUNET_i2s (&sender->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&sender->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test triest to send from %u (%s) -> peer %u (%s)\n", sender->no, diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c index 67530f421..87383bbac 100644 --- a/src/transport/test_transport_api_restart_1peer.c +++ b/src/transport/test_transport_api_restart_1peer.c @@ -199,7 +199,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", p->no, ps, ntohs (message->type), ntohs (message->size), t->no, @@ -261,7 +261,7 @@ notify_ready (void *cls, size_t size, void *buf) hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); hdr->type = htons (MTYPE); } - char *ps = strdup (GNUNET_i2s (&p2->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", @@ -279,7 +279,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; - char *receiver_s = strdup (GNUNET_i2s (&p1->id)); + char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", @@ -308,7 +308,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, @@ -328,7 +328,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) struct PeerContext *p = cls; - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, GNUNET_i2s (peer)); @@ -343,7 +343,7 @@ static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { cc = NULL; - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); @@ -367,7 +367,7 @@ start_cb (struct PeerContext *p, void *cls) if (started != 2) return; - char *sender_c = strdup (GNUNET_i2s (&p1->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c index dab8f39a6..44a41614f 100644 --- a/src/transport/test_transport_api_restart_2peers.c +++ b/src/transport/test_transport_api_restart_2peers.c @@ -204,7 +204,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", p->no, ps, ntohs (message->type), ntohs (message->size), t->no, @@ -267,7 +267,7 @@ notify_ready (void *cls, size_t size, void *buf) hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); hdr->type = htons (MTYPE); } - char *ps = strdup (GNUNET_i2s (&p2->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", @@ -285,7 +285,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; - char *receiver_s = strdup (GNUNET_i2s (&p1->id)); + char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", @@ -314,7 +314,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, t = p2; GNUNET_assert (t != NULL); - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, @@ -334,7 +334,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) struct PeerContext *p = cls; - char *ps = strdup (GNUNET_i2s (&p->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, GNUNET_i2s (peer)); @@ -349,7 +349,7 @@ static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { cc = NULL; - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); @@ -373,7 +373,7 @@ start_cb (struct PeerContext *p, void *cls) if (started != 2) return; - char *sender_c = strdup (GNUNET_i2s (&p1->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c index 9a16447f3..29f7dd4af 100644 --- a/src/transport/test_transport_api_timeout.c +++ b/src/transport/test_transport_api_timeout.c @@ -227,7 +227,7 @@ static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { cc = NULL; - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %s <-> %s\n", p1_c, GNUNET_i2s (&p2->id)); @@ -251,7 +251,7 @@ start_cb (struct PeerContext *p, void *cls) if (started != 2) return; - char *sender_c = strdup (GNUNET_i2s (&p1->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c index 1e93615e7..90defae02 100644 --- a/src/transport/test_transport_api_unreliability.c +++ b/src/transport/test_transport_api_unreliability.c @@ -456,7 +456,7 @@ sendtask () static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %s <-> %s\n", p1_c, GNUNET_i2s (&p2->id)); diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c index feca0c8b7..414bca7c8 100644 --- a/src/transport/test_transport_api_unreliability_constant.c +++ b/src/transport/test_transport_api_unreliability_constant.c @@ -402,7 +402,7 @@ sendtask () static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { - char *p1_c = strdup (GNUNET_i2s (&p1->id)); + char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %s <-> %s\n", p1_c, GNUNET_i2s (&p2->id)); diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c index 7ba78c04e..be8c547cc 100644 --- a/src/transport/test_transport_testing.c +++ b/src/transport/test_transport_testing.c @@ -94,7 +94,7 @@ end_badly () static void testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) { - char *ps = strdup (GNUNET_i2s (&p1->id)); + char *ps = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%4s') connected to peer %u (`%s')!\n", p1->no, ps, @@ -140,7 +140,7 @@ start_cb (struct PeerContext *p, void *cls) if (started != 2) return; - char *sender_c = strdup (GNUNET_i2s (&p1->id)); + char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", -- cgit v1.2.3