diff options
| author | Dennis Camera <skonfig@dtnr.ch> | 2022-08-22 23:41:16 +0200 |
|---|---|---|
| committer | Dennis Camera <skonfig@dtnr.ch> | 2022-08-22 23:41:16 +0200 |
| commit | b881b02a54e18d0897822044b48730eaa2c7bb9c (patch) | |
| tree | f3df60acf1ea75bbac95b2ffdeaf1f52edbd3181 /src/util/string.h | |
| parent | 2f425cb9e9d28c8e7f017a4fbe1203c7431e745b (diff) | |
| download | skonfig-c-b881b02a54e18d0897822044b48730eaa2c7bb9c.tar.gz skonfig-c-b881b02a54e18d0897822044b48730eaa2c7bb9c.zip | |
Fix clang compile errors
Diffstat (limited to 'src/util/string.h')
| -rw-r--r-- | src/util/string.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/string.h b/src/util/string.h index b75e783..5e31e21 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -132,9 +132,9 @@ size_t stranjoin_r( char *_strjoin( /* internal */ - char sep, /* const char * */...); + char sep, void *_, /* const char * */...); size_t _strjoin_r( /* internal */ - char *restrict buf, size_t buflen, char sep, /* const char * */...); + char sep, char *restrict buf, size_t buflen, /* const char * */...); /** * strjoin: @@ -146,20 +146,20 @@ size_t _strjoin_r( /* internal */ * @param ...: a list of strings to join * @return a newly-allocated string containing all of the strings joined */ -#define strjoin(sep, ...) _strjoin(sep, __VA_ARGS__, NULL) +#define strjoin(sep, ...) _strjoin(sep, NULL, __VA_ARGS__, NULL) /** * strjoin_r: * Joins a number of strings together to form one long string stored in a * caller-allocated buffer with the @separator inserted betwween each of them. * + * @param sep: a char to insert between each of the strings * @param buf: the destination buffer (nothing will be written to it if NULL) * @param buflen: the length of @buf - * @param sep: a char to insert between each of the strings * @param ...: a list of strings to join * @return the length of the untruncated joined string */ -#define strjoin_r(sep, ...) _strjoin_r(sep, __VA_ARGS__, NULL) +#define strjoin_r(buf, buflen, sep, ...) _strjoin_r(sep, buf, buflen, __VA_ARGS__, NULL) /** * pathjoin: |
