aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tool
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-05-27 11:36:51 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-05-27 11:36:51 +0000
commit2cecee44de434344273c797e6db4878a81e2f6fa (patch)
tree3d5ae7a4cb40a04856f8dd9d7d4b73820c3dcc1d /src/ats-tool
parent843b0b72afd76a8a0444d302ff4ec8cc51eb50fa (diff)
change order for error check
Diffstat (limited to 'src/ats-tool')
-rw-r--r--src/ats-tool/gnunet-ats.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 3f5865e990..55132f8ef6 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -185,6 +185,15 @@ transport_addr_to_str_cb(void *cls, const char *address, int res)
uint32_t ats_value;
uint32_t network;
+ if (res == GNUNET_SYSERR)
+ {
+ fprintf (stderr, "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n",
+ GNUNET_i2s (&pr->address->peer),
+ pr->address->transport_name,
+ pr->address->address_length );
+ return;
+ }
+
if (NULL == address)
{
/* We're done */
@@ -204,15 +213,6 @@ transport_addr_to_str_cb(void *cls, const char *address, int res)
return;
}
- if (res == GNUNET_SYSERR)
- {
- fprintf (stderr, "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n",
- GNUNET_i2s (&pr->address->peer),
- pr->address->transport_name,
- pr->address->address_length );
- return;
- }
-
ats_str = GNUNET_strdup("");
network = GNUNET_ATS_NET_UNSPECIFIED;
for (c = 0; c < pr->ats_count; c++)