summaryrefslogtreecommitdiff
path: root/src/transport/transport-testing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-04 21:01:22 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-04 21:01:22 +0000
commit0e4c7cdccfc4105f9c6e529cfa0e3722104b0ddf (patch)
treeac53b9088e75b7041e14e3455698a75da085b3d7 /src/transport/transport-testing.c
parentb6d09b511fbd61d3b36fde4c28624bed321bf4a1 (diff)
-misc bugfixes, travel hacking
Diffstat (limited to 'src/transport/transport-testing.c')
-rw-r--r--src/transport/transport-testing.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index f1c06ebc0..0c51ef334 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -71,19 +71,15 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
{
struct PeerContext *p = cls;
+ char *p2_s;
+ struct PeerContext *p2;
- /* Find PeerContext */
- GNUNET_assert (p != 0);
- GNUNET_assert (p->tth != NULL);
- struct PeerContext *p2 = find_peer_context (p->tth, peer);
-
- if (p == NULL)
- return;
+ GNUNET_assert (NULL != p);
+ GNUNET_assert (NULL != p->tth);
+ p2 = find_peer_context (p->tth, peer);
if (p->nc != NULL)
p->nc (p->cb_cls, peer, ats, ats_count);
- char *p2_s;
-
if (p2 != NULL)
GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id));
else
@@ -788,5 +784,4 @@ fail:
}
-
/* end of transport-testing.c */