additional function to check option
[oweals/gnunet.git] / src / hello / hello.c
index 37acc599677bf2a62c70f727385bd89d553645bd..7f77067132f698d4eef28553fdf253171262a9da 100644 (file)
@@ -183,7 +183,7 @@ get_hello_address_size (const char *buf,
     pos++;
     slen++;
   }
-  if (left == 0)
+  if (0 == left)
   {
     /* 0-termination not found */
     GNUNET_break_op (0);
@@ -300,7 +300,7 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
   while (insize > 0)
   {
     esize = get_hello_address_size (inptr, insize, &alen);
-    if (esize == 0)
+    if (0 == esize)
     {
       GNUNET_break (0);
       GNUNET_free_non_null (ret);
@@ -312,6 +312,7 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
     address.address = &inptr[esize - alen];
     address.address_length = alen;
     address.transport_name = inptr;
+    address.local_info = GNUNET_HELLO_ADDRESS_INFO_NONE;
     iret = it (it_cls, &address, GNUNET_TIME_absolute_ntoh (expire));
     if (iret == GNUNET_SYSERR)
     {