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 /doc | |
parent | 2bb2faa207e4015609100a1aca38af344c65596f (diff) | |
download | gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.tar.gz gnunet-fa2978883e1585b1eeff3a22b7a9b4f174a45ca3.zip |
get rid of plain memcpy calls
Diffstat (limited to 'doc')
-rw-r--r-- | doc/documentation/tutorial-examples/005.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/documentation/tutorial-examples/005.c b/doc/documentation/tutorial-examples/005.c index 0c459f509..1b59f85a6 100644 --- a/doc/documentation/tutorial-examples/005.c +++ b/doc/documentation/tutorial-examples/005.c | |||
@@ -2,7 +2,8 @@ struct GNUNET_MQ_Envelope *env; | |||
2 | struct GNUNET_MessageHeader *msg; | 2 | struct GNUNET_MessageHeader *msg; |
3 | 3 | ||
4 | env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE); | 4 | env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE); |
5 | memcpy (&msg[1], &payload, payload_size); | 5 | GNUNET_memcpy (&msg[1], |
6 | &payload, | ||
7 | payload_size); | ||
6 | // Send message via message queue 'mq' | 8 | // Send message via message queue 'mq' |
7 | GNUNET_mq_send (mq, env); | 9 | GNUNET_mq_send (mq, env); |
8 | |||