gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37373 - gnunet/src/identity


From: gnunet
Subject: [GNUnet-SVN] r37373 - gnunet/src/identity
Date: Sat, 25 Jun 2016 19:32:19 +0200

Author: grothoff
Date: 2016-06-25 19:32:18 +0200 (Sat, 25 Jun 2016)
New Revision: 37373

Modified:
   gnunet/src/identity/identity_api.c
Log:
-cosmetics

Modified: gnunet/src/identity/identity_api.c
===================================================================
--- gnunet/src/identity/identity_api.c  2016-06-25 17:30:47 UTC (rev 37372)
+++ gnunet/src/identity/identity_api.c  2016-06-25 17:32:18 UTC (rev 37373)
@@ -477,11 +477,11 @@
 check_identity_set_default (void *cls,
                             const struct GNUNET_IDENTITY_SetDefaultMessage 
*sdm)
 {
-  uint16_t size = ntohs (sdm->header.size);
+  uint16_t size = ntohs (sdm->header.size) - sizeof (*sdm);
   uint16_t name_len = ntohs (sdm->name_len);
   const char *str = (const char *) &sdm[1];
 
-  if ( (size != name_len + sizeof (struct GNUNET_IDENTITY_SetDefaultMessage)) 
||
+  if ( (size != name_len) ||
        ( (0 != name_len) &&
          ('\0' != str[name_len - 1]) ) )
   {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]