-fix
authorChristian Grothoff <christian@grothoff.org>
Tue, 4 Dec 2012 15:42:52 +0000 (15:42 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 4 Dec 2012 15:42:52 +0000 (15:42 +0000)
src/namestore/namestore_common.c

index 8f3d3c522bd738405965b80c0462cca5bec0c5cc..09b5b46e971d9208154eae3bf5b953e022ac0c8e 100644 (file)
@@ -435,13 +435,13 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type,
       return NULL; /* malformed */
     vpn = data;
     GNUNET_CRYPTO_hash_to_enc (&vpn->peer, &s_peer);
-    if (0 == GNUNET_asprintf (&vpn_str, "%hu %s %s",
-                             vpn->proto,
+    if (0 == GNUNET_asprintf (&vpn_str, "%u %s %s",
+                             (unsigned int) ntohl (vpn->proto),
                              (const char*) &s_peer,
                              (const char*) &vpn[1]))
     {
-        GNUNET_free (vpn_str);
-        return NULL;
+      GNUNET_free (vpn_str);
+      return NULL;
     }
     return vpn_str;
   case GNUNET_DNSPARSER_TYPE_SRV: