aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-13 19:55:46 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-13 19:55:46 +0200
commitfa2978883e1585b1eeff3a22b7a9b4f174a45ca3 (patch)
tree52800dd5062534729be80227608def6f6c0c45ac /src/namestore
parent2bb2faa207e4015609100a1aca38af344c65596f (diff)
downloadgnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.tar.gz
gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.zip
get rid of plain memcpy calls
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-service-namestore.c12
-rw-r--r--src/namestore/gnunet-zoneimport.c18
2 files changed, 15 insertions, 15 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index b47b89fe8..5e654dbde 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1417,17 +1417,17 @@ handle_record_store (void *cls,
1417 sa); 1417 sa);
1418 sa->nc = nc; 1418 sa->nc = nc;
1419 sa->rsm = (const struct RecordStoreMessage *) &sa[1]; 1419 sa->rsm = (const struct RecordStoreMessage *) &sa[1];
1420 memcpy (&sa[1], 1420 GNUNET_memcpy (&sa[1],
1421 rp_msg, 1421 rp_msg,
1422 ntohs (rp_msg->gns_header.header.size)); 1422 ntohs (rp_msg->gns_header.header.size));
1423 sa->zm_pos = monitor_head; 1423 sa->zm_pos = monitor_head;
1424 sa->conv_name = conv_name; 1424 sa->conv_name = conv_name;
1425 GNUNET_array_grow (sa->rd, 1425 GNUNET_array_grow (sa->rd,
1426 sa->rd_count, 1426 sa->rd_count,
1427 rd_clean_off); 1427 rd_clean_off);
1428 memcpy (sa->rd, 1428 GNUNET_memcpy (sa->rd,
1429 rd_clean, 1429 rd_clean,
1430 sizeof (struct GNUNET_GNSRECORD_Data) * rd_clean_off); 1430 sizeof (struct GNUNET_GNSRECORD_Data) * rd_clean_off);
1431 continue_store_activity (sa); 1431 continue_store_activity (sa);
1432 } 1432 }
1433} 1433}
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c
index 97133766e..b394178a6 100644
--- a/src/namestore/gnunet-zoneimport.c
+++ b/src/namestore/gnunet-zoneimport.c
@@ -434,9 +434,9 @@ get_label (struct Request *req)
434 GNUNET_break (0); 434 GNUNET_break (0);
435 return NULL; 435 return NULL;
436 } 436 }
437 memcpy (label, 437 GNUNET_memcpy (label,
438 req->hostname, 438 req->hostname,
439 dot - req->hostname); 439 dot - req->hostname);
440 label[dot - req->hostname] = '\0'; 440 label[dot - req->hostname] = '\0';
441 return label; 441 return label;
442} 442}
@@ -491,9 +491,9 @@ build_dns_query (struct Request *req,
491 GNUNET_free (rawp); 491 GNUNET_free (rawp);
492 return NULL; 492 return NULL;
493 } 493 }
494 memcpy (raw, 494 GNUNET_memcpy (raw,
495 rawp, 495 rawp,
496 *raw_size); 496 *raw_size);
497 GNUNET_free (rawp); 497 GNUNET_free (rawp);
498 return raw; 498 return raw;
499} 499}
@@ -1683,9 +1683,9 @@ queue (const char *hostname)
1683 req = GNUNET_malloc (sizeof (struct Request) + hlen); 1683 req = GNUNET_malloc (sizeof (struct Request) + hlen);
1684 req->zone = zone; 1684 req->zone = zone;
1685 req->hostname = (char *) &req[1]; 1685 req->hostname = (char *) &req[1];
1686 memcpy (req->hostname, 1686 GNUNET_memcpy (req->hostname,
1687 hostname, 1687 hostname,
1688 hlen); 1688 hlen);
1689 req->id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, 1689 req->id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE,
1690 UINT16_MAX); 1690 UINT16_MAX);
1691 GNUNET_CRYPTO_hash (req->hostname, 1691 GNUNET_CRYPTO_hash (req->hostname,