glib-aux: fix spurious semicolon after NM_STR_BUF_INIT() macros

It's wrong, and it breaks certain uses.

Fixes: 13d25f9d0b ('glib-aux: add support for starting with stack-allocated buffer in NMStrBuf')
This commit is contained in:
Thomas Haller
2022-08-26 14:47:24 +02:00
parent 98c3ac1480
commit c5ec4ebd77

View File

@@ -78,14 +78,14 @@ NM_STR_BUF_INIT(gsize allocated, gboolean do_bzero_mem)
? (size) \ ? (size) \
: 0, \ : 0, \
FALSE, \ FALSE, \
(do_bzero_mem)); (do_bzero_mem))
#define NM_STR_BUF_INIT_ARR(arr, do_bzero_mem) \ #define NM_STR_BUF_INIT_ARR(arr, do_bzero_mem) \
NM_STR_BUF_INIT_FULL((arr), \ NM_STR_BUF_INIT_FULL((arr), \
0, \ 0, \
NM_STATIC_ASSERT_EXPR_1(sizeof(arr) > sizeof(char *)) ? sizeof(arr) : 0, \ NM_STATIC_ASSERT_EXPR_1(sizeof(arr) > sizeof(char *)) ? sizeof(arr) : 0, \
FALSE, \ FALSE, \
(do_bzero_mem)); (do_bzero_mem))
void _nm_str_buf_ensure_size(NMStrBuf *strbuf, gsize new_size, gboolean reserve_exact); void _nm_str_buf_ensure_size(NMStrBuf *strbuf, gsize new_size, gboolean reserve_exact);