shared: return NMStrBuf instance from nm_str_buf_reset()

it can be useful for chaining, and it costs nothing to do this
on an inline function.
This commit is contained in:
Thomas Haller 2021-02-10 09:55:40 +01:00
parent edc7c7204c
commit e12e4ef849
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -294,7 +294,7 @@ nm_str_buf_append_c_len(NMStrBuf *strbuf, char ch, gsize len)
/*****************************************************************************/
static inline void
static inline NMStrBuf *
nm_str_buf_reset(NMStrBuf *strbuf)
{
_nm_str_buf_assert(strbuf);
@ -306,6 +306,8 @@ nm_str_buf_reset(NMStrBuf *strbuf)
}
strbuf->_priv_len = 0;
}
return strbuf;
}
/*****************************************************************************/