diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-25 22:15:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-25 22:15:37 +0000 |
commit | ecdc64b5af16246777bb2a4cab79e203fe462a66 (patch) | |
tree | 5add1c039d56c297fd199a2829a3c1453e0f5e38 /src/transport/test_transport_api.c | |
parent | 48a507423a2f014aeb559ad4e58acd7ab1c8fc41 (diff) | |
download | gnunet-ecdc64b5af16246777bb2a4cab79e203fe462a66.tar.gz gnunet-ecdc64b5af16246777bb2a4cab79e203fe462a66.zip |
LRN: Use GNUNET_strdup() instead of strdup ()
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r-- | src/transport/test_transport_api.c | 14 |
1 files changed, 7 insertions, 7 deletions
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, | |||
151 | t = p2; | 151 | t = p2; |
152 | GNUNET_assert (t != NULL); | 152 | GNUNET_assert (t != NULL); |
153 | 153 | ||
154 | char *ps = strdup (GNUNET_i2s (&p->id)); | 154 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
155 | 155 | ||
156 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 156 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
157 | "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", | 157 | "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) | |||
200 | hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); | 200 | hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); |
201 | hdr->type = htons (MTYPE); | 201 | hdr->type = htons (MTYPE); |
202 | } | 202 | } |
203 | char *ps = strdup (GNUNET_i2s (&p2->id)); | 203 | char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); |
204 | 204 | ||
205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
206 | "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", | 206 | "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) | |||
218 | 218 | ||
219 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 219 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
220 | return; | 220 | return; |
221 | char *receiver_s = strdup (GNUNET_i2s (&p1->id)); | 221 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
222 | 222 | ||
223 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 223 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
224 | "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", | 224 | "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", |
@@ -247,7 +247,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
247 | t = p2; | 247 | t = p2; |
248 | GNUNET_assert (t != NULL); | 248 | GNUNET_assert (t != NULL); |
249 | 249 | ||
250 | char *ps = strdup (GNUNET_i2s (&p->id)); | 250 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
251 | 251 | ||
252 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 252 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
253 | "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, | 253 | "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, |
@@ -260,7 +260,7 @@ static void | |||
260 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | 260 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) |
261 | { | 261 | { |
262 | struct PeerContext *p = cls; | 262 | struct PeerContext *p = cls; |
263 | char *ps = strdup (GNUNET_i2s (&p->id)); | 263 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
264 | 264 | ||
265 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 265 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
266 | "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, | 266 | "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, |
@@ -275,7 +275,7 @@ static void | |||
275 | testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | 275 | testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) |
276 | { | 276 | { |
277 | cc = NULL; | 277 | cc = NULL; |
278 | char *p1_c = strdup (GNUNET_i2s (&p1->id)); | 278 | char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
279 | 279 | ||
280 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", | 280 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", |
281 | p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); | 281 | p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); |
@@ -299,7 +299,7 @@ start_cb (struct PeerContext *p, void *cls) | |||
299 | if (started != 2) | 299 | if (started != 2) |
300 | return; | 300 | return; |
301 | 301 | ||
302 | char *sender_c = strdup (GNUNET_i2s (&p1->id)); | 302 | char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
303 | 303 | ||
304 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 304 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
305 | "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", | 305 | "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", |