mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 13:38:43 +02:00
shared: add nm_gstring_prepare() util
This commit is contained in:
parent
b55fba8fbd
commit
bb53b46bd1
1 changed files with 10 additions and 0 deletions
|
|
@ -420,6 +420,16 @@ fcn (void) \
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static inline GString *
|
||||||
|
nm_gstring_prepare (GString **l)
|
||||||
|
{
|
||||||
|
if (*l)
|
||||||
|
g_string_set_size (*l, 0);
|
||||||
|
else
|
||||||
|
*l = g_string_sized_new (30);
|
||||||
|
return *l;
|
||||||
|
}
|
||||||
|
|
||||||
static inline const char *
|
static inline const char *
|
||||||
nm_str_not_empty (const char *str)
|
nm_str_not_empty (const char *str)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue