commit 2cecee44de434344273c797e6db4878a81e2f6fa
parent 843b0b72afd76a8a0444d302ff4ec8cc51eb50fa
Author: Matthias Wachs <wachs@net.in.tum.de>
Date: Tue, 27 May 2014 11:36:51 +0000
change order for error check
Diffstat:
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git 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++)