gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r30676 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r30676 - gnunet/src/util
Date: Wed, 13 Nov 2013 22:51:22 +0100

Author: grothoff
Date: 2013-11-13 22:51:21 +0100 (Wed, 13 Nov 2013)
New Revision: 30676

Modified:
   gnunet/src/util/container_multipeermap.c
Log:
-avoid bus error on sparc

Modified: gnunet/src/util/container_multipeermap.c
===================================================================
--- gnunet/src/util/container_multipeermap.c    2013-11-13 20:37:46 UTC (rev 
30675)
+++ gnunet/src/util/container_multipeermap.c    2013-11-13 21:51:21 UTC (rev 
30676)
@@ -245,8 +245,11 @@
 idx_of (const struct GNUNET_CONTAINER_MultiPeerMap *map,
         const struct GNUNET_PeerIdentity *key)
 {
-  GNUNET_assert (map != NULL);
-  return (*(unsigned int *) key) % map->map_length;
+  unsigned int kx;
+
+  GNUNET_assert (NULL != map);
+  memcpy (&kx, key, sizeof (kx));
+  return kx % map->map_length;
 }
 
 




reply via email to

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