Standardize prototypes of platform_memcpy/memset
As replacements of standard library functions, they should have the same
prototype, including return type.
While it doesn't usually matter when used directly, it does when the address
of the function is taken, as done with memset_func, used for implementing
mbedtls_platform_zeroize().
diff --git a/include/mbedtls/platform_util.h b/include/mbedtls/platform_util.h
index f2aeffc..67a7877 100644
--- a/include/mbedtls/platform_util.h
+++ b/include/mbedtls/platform_util.h
@@ -178,8 +178,9 @@
* \param value Value to be used when setting the buffer.
* \param num The length of the buffer in bytes.
*
+ * \return The value of \p ptr.
*/
-void mbedtls_platform_memset( void *ptr, int value, size_t num );
+void *mbedtls_platform_memset( void *ptr, int value, size_t num );
/**
* \brief Secure memcpy
@@ -195,8 +196,9 @@
* \param src Source buffer where the data is being copied from.
* \param num The length of the buffers in bytes.
*
+ * \return The value of \p dst.
*/
-void mbedtls_platform_memcpy( void *dst, const void *src, size_t num );
+void *mbedtls_platform_memcpy( void *dst, const void *src, size_t num );
/**
* \brief Secure memcmp