gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r330 - GNUnet/src/util


From: grothoff
Subject: [GNUnet-SVN] r330 - GNUnet/src/util
Date: Sat, 26 Feb 2005 21:35:05 -0800 (PST)

Author: grothoff
Date: 2005-02-26 21:35:04 -0800 (Sat, 26 Feb 2005)
New Revision: 330

Modified:
   GNUnet/src/util/hashing.c
Log:
fix

Modified: GNUnet/src/util/hashing.c
===================================================================
--- GNUnet/src/util/hashing.c   2005-02-27 05:33:42 UTC (rev 329)
+++ GNUnet/src/util/hashing.c   2005-02-27 05:35:04 UTC (rev 330)
@@ -385,6 +385,8 @@
 void hashToKey(const HashCode160 * hc,
               SESSIONKEY * skey,
               INITVECTOR * iv) {
+  GNUNET_ASSERT((sizeof(HashCode160) - SESSIONKEY_LEN) * 2 
+               == sizeof(INITVECTOR));
   memcpy(skey,
         hc,
         sizeof(SESSIONKEY));
@@ -393,11 +395,9 @@
   memcpy(&iv->iv[0], 
         &(((char *)hc)[SESSIONKEY_LEN]), 
         sizeof(HashCode160) - SESSIONKEY_LEN);
-  GNUNET_ASSERT(sizeof(HashCode160) - SESSIONKEY_LEN ==
-               sizeof(INITVECTOR) - (sizeof(HashCode160) - SESSIONKEY_LEN));
   memcpy(&iv->iv[sizeof(HashCode160) - SESSIONKEY_LEN],
         &(((char *)hc)[SESSIONKEY_LEN]), 
-        sizeof(HashCode160) - sizeof(SESSIONKEY));
+        sizeof(HashCode160) - SESSIONKEY_LEN);
 }
 
 





reply via email to

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