void xfree(void *); /** Free memory allocated by xmalloc() or xrealloc(). **/
void *xmalloc_zero(uns) LIKE_MALLOC; /** Allocate memory and fill it by zeroes. **/
-char *xstrdup(const char *) LIKE_MALLOC; /** Make a xmalloc()'ed copy of a string. **/
+char *xstrdup(const char *) LIKE_MALLOC; /** Make a xmalloc()'ed copy of a string. Returns NULL for NULL string. **/
/*** === Trivial timers (timer.c) ***/
/**
* Save the current state of a memory pool.
- * Do not call this function with an opened growing buffer.
+ * Do not call this function with an opened growing buffer.
**/
static inline void mp_save(struct mempool *pool, struct mempool_state *state)
{
* -----------------
***/
-char *mp_strdup(struct mempool *, const char *) LIKE_MALLOC; /** Makes a copy of a string on a mempool. **/
+char *mp_strdup(struct mempool *, const char *) LIKE_MALLOC; /** Makes a copy of a string on a mempool. Returns NULL for NULL string. **/
void *mp_memdup(struct mempool *, const void *, uns) LIKE_MALLOC; /** Makes a copy of a memory block on a mempool. **/
/**
* Concatenates all passed strings. The last parameter must be NULL.