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/gns/plugin_gnsrecord_gns.c | |
parent | 2bb2faa207e4015609100a1aca38af344c65596f (diff) | |
download | gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.tar.gz gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.zip |
get rid of plain memcpy calls
Diffstat (limited to 'src/gns/plugin_gnsrecord_gns.c')
-rw-r--r-- | src/gns/plugin_gnsrecord_gns.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c index 07d1a9c04..b88e8fcc2 100644 --- a/src/gns/plugin_gnsrecord_gns.c +++ b/src/gns/plugin_gnsrecord_gns.c | |||
@@ -102,9 +102,9 @@ gns_value_to_string (void *cls, | |||
102 | ('\0' != cdata[data_size - 1]) ) | 102 | ('\0' != cdata[data_size - 1]) ) |
103 | return NULL; /* malformed */ | 103 | return NULL; /* malformed */ |
104 | /* need to memcpy for alignment */ | 104 | /* need to memcpy for alignment */ |
105 | memcpy (&vpn, | 105 | GNUNET_memcpy (&vpn, |
106 | data, | 106 | data, |
107 | sizeof (vpn)); | 107 | sizeof (vpn)); |
108 | GNUNET_asprintf (&vpn_str, | 108 | GNUNET_asprintf (&vpn_str, |
109 | "%u %s %s", | 109 | "%u %s %s", |
110 | (unsigned int) ntohs (vpn.proto), | 110 | (unsigned int) ntohs (vpn.proto), |
@@ -122,9 +122,9 @@ gns_value_to_string (void *cls, | |||
122 | cdata = data; | 122 | cdata = data; |
123 | if (data_size < sizeof (struct GNUNET_GNSRECORD_BoxRecord)) | 123 | if (data_size < sizeof (struct GNUNET_GNSRECORD_BoxRecord)) |
124 | return NULL; /* malformed */ | 124 | return NULL; /* malformed */ |
125 | memcpy (&box, | 125 | GNUNET_memcpy (&box, |
126 | data, | 126 | data, |
127 | sizeof (box)); | 127 | sizeof (box)); |
128 | rt = ntohl (box.record_type); | 128 | rt = ntohl (box.record_type); |
129 | ival = GNUNET_GNSRECORD_value_to_string (rt, | 129 | ival = GNUNET_GNSRECORD_value_to_string (rt, |
130 | &cdata[sizeof (box)], | 130 | &cdata[sizeof (box)], |