util: document xmemdup()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-10-20 11:14:56 +02:00
parent c19965cfff
commit 7d34f45ed6
1 changed files with 5 additions and 0 deletions

View File

@ -148,6 +148,11 @@ xrealloc(void **ptr, ssize_t newsize)
}
}
/** Duplicate a memory zone.
* \param src The source.
* \param size The source size.
* \return The memory address of the copy.
*/
static inline void *xmemdup(const void *src, ssize_t size)
{
return memcpy(xmalloc(size), src, size);