mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-20 03:38:33 +02:00
shared/strbuf: add nm_str_buf_is_initalized() helper
This commit is contained in:
parent
19fff8444e
commit
560b840a11
1 changed files with 11 additions and 0 deletions
|
|
@ -228,6 +228,17 @@ nm_str_buf_ensure_trailing_c (NMStrBuf *strbuf, char ch)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gboolean
|
||||
nm_str_buf_is_initalized (NMStrBuf *strbuf)
|
||||
{
|
||||
nm_assert (strbuf);
|
||||
#if NM_MORE_ASSERTS
|
||||
if (strbuf->_str)
|
||||
_nm_str_buf_assert (strbuf);
|
||||
#endif
|
||||
return !!strbuf->_str;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_str_buf_get_str:
|
||||
* @strbuf: the #NMStrBuf instance
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue