From 2cecee44de434344273c797e6db4878a81e2f6fa Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 27 May 2014 11:36:51 +0000 Subject: change order for error check --- src/ats-tool/gnunet-ats.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/ats-tool') diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index 3f5865e99..55132f8ef 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++) -- cgit v1.2.3