mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
string-util: imply NULL termination of strextend() argument list
The trailing NULL in the argument list is now implied (similar to what we already have in place in strjoin()).
This commit is contained in:
@@ -189,9 +189,10 @@ char *strreplace(const char *text, const char *old_string, const char *new_strin
|
||||
|
||||
char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]);
|
||||
|
||||
char *strextend_with_separator(char **x, const char *separator, ...) _sentinel_;
|
||||
char *strextend_with_separator_internal(char **x, const char *separator, ...) _sentinel_;
|
||||
|
||||
#define strextend(x, ...) strextend_with_separator(x, NULL, __VA_ARGS__)
|
||||
#define strextend_with_separator(x, separator, ...) strextend_with_separator_internal(x, separator, __VA_ARGS__, NULL)
|
||||
#define strextend(x, ...) strextend_with_separator_internal(x, NULL, __VA_ARGS__, NULL)
|
||||
|
||||
char *strrep(const char *s, unsigned n);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user