diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-13 19:55:46 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-13 19:55:46 +0200 |
commit | fa2978883e1585b1eeff3a22b7a9b4f174a45ca3 (patch) | |
tree | 52800dd5062534729be80227608def6f6c0c45ac /src/namestore/gnunet-zoneimport.c | |
parent | 2bb2faa207e4015609100a1aca38af344c65596f (diff) | |
download | gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.tar.gz gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.zip |
get rid of plain memcpy calls
Diffstat (limited to 'src/namestore/gnunet-zoneimport.c')
-rw-r--r-- | src/namestore/gnunet-zoneimport.c | 18 |
1 files changed, 9 insertions, 9 deletions
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, |