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_disconnect.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_disconnect.c')
-rw-r--r-- | src/transport/test_transport_api_disconnect.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 | |||
154 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | 154 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) |
155 | { | 155 | { |
156 | struct PeerContext *p = cls; | 156 | struct PeerContext *p = cls; |
157 | char *ps = strdup (GNUNET_i2s (&p->id)); | 157 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
158 | 158 | ||
159 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 159 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
160 | "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, | 160 | "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, | |||
202 | t = p2; | 202 | t = p2; |
203 | GNUNET_assert (t != NULL); | 203 | GNUNET_assert (t != NULL); |
204 | 204 | ||
205 | char *ps = strdup (GNUNET_i2s (&p->id)); | 205 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
206 | 206 | ||
207 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 207 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
208 | "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", | 208 | "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) | |||
246 | hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); | 246 | hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); |
247 | hdr->type = htons (MTYPE); | 247 | hdr->type = htons (MTYPE); |
248 | } | 248 | } |
249 | char *ps = strdup (GNUNET_i2s (&p2->id)); | 249 | char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); |
250 | 250 | ||
251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
252 | "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", | 252 | "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) | |||
264 | 264 | ||
265 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 265 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
266 | return; | 266 | return; |
267 | char *receiver_s = strdup (GNUNET_i2s (&p1->id)); | 267 | char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
268 | 268 | ||
269 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 269 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
270 | "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", | 270 | "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", |
@@ -293,7 +293,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
293 | t = p2; | 293 | t = p2; |
294 | GNUNET_assert (t != NULL); | 294 | GNUNET_assert (t != NULL); |
295 | 295 | ||
296 | char *ps = strdup (GNUNET_i2s (&p->id)); | 296 | char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); |
297 | 297 | ||
298 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 298 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
299 | "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, | 299 | "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, |
@@ -306,7 +306,7 @@ static void | |||
306 | testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | 306 | testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) |
307 | { | 307 | { |
308 | cc = NULL; | 308 | cc = NULL; |
309 | char *p1_c = strdup (GNUNET_i2s (&p1->id)); | 309 | char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
310 | 310 | ||
311 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", | 311 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", |
312 | p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); | 312 | p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); |
@@ -330,7 +330,7 @@ start_cb (struct PeerContext *p, void *cls) | |||
330 | if (started != 2) | 330 | if (started != 2) |
331 | return; | 331 | return; |
332 | 332 | ||
333 | char *sender_c = strdup (GNUNET_i2s (&p1->id)); | 333 | char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); |
334 | 334 | ||
335 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 335 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
336 | "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", | 336 | "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", |