-simplify code
authorChristian Grothoff <christian@grothoff.org>
Thu, 5 Dec 2013 21:54:21 +0000 (21:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 5 Dec 2013 21:54:21 +0000 (21:54 +0000)
src/scalarproduct/gnunet-service-scalarproduct.c

index fb1d418c399514173a653365f6462a31dbdc92bc..748157cae0e85ce67ec123fd60fbaff779f557b5 100644 (file)
@@ -912,9 +912,10 @@ prepare_client_response (void *cls,
 
   msg_length = sizeof (struct GNUNET_SCALARPRODUCT_client_response) +product_length;
   msg = GNUNET_malloc (msg_length);
-  memcpy (&msg->key, &session->key, sizeof (struct GNUNET_HashCode));
-  memcpy (&msg->peer, &session->peer, sizeof ( struct GNUNET_PeerIdentity));
-  if (product_exported != NULL) {
+  msg->key = session->key;
+  &msg->peer = session->peer;
+  if (product_exported != NULL)
+  {
     memcpy (&msg[1], product_exported, product_length);
     GNUNET_free (product_exported);
   }