-improving error reporting on #2295
authorChristian Grothoff <christian@grothoff.org>
Wed, 2 May 2012 19:47:38 +0000 (19:47 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 2 May 2012 19:47:38 +0000 (19:47 +0000)
src/util/strings.c

index 6ebf32a987e148131e26a7b9b3821289afe40135..27292a4c8e1d7707026462e602fa153840ab807e 100644 (file)
@@ -1027,7 +1027,7 @@ GNUNET_STRINGS_to_address_ipv6 (const char *zt_addr,
     return GNUNET_SYSERR;
   }
   ret = SSCANF (port_colon, ":%u", &port);
-  if ( (-1 != ret) || (port > 65535) )
+  if ( (1 != ret) || (port > 65535) )
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                _("IPv6 address did contain a valid port number after the last ':'\n"));