1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

shl: util: add _shl_sentinel_ marker for strjoin

This is very handy to catch wrong usage of shl_strjoin(). We now get a gcc
warning if the sentinel (NULL) is omitted.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
David Herrmann 2014-02-17 16:19:48 +01:00
parent 77aae60c52
commit 5fb83c9159

View file

@ -84,7 +84,7 @@ void *shl_greedy_realloc0(void **mem, size_t *size, size_t need);
/* string helpers */
char *shl_strcat(const char *first, const char *second);
char *shl_strjoin(const char *first, ...);
_shl_sentinel_ char *shl_strjoin(const char *first, ...);
static inline char *shl_startswith(const char *str, const char *prefix)
{