shared: add nm_gstring_prepare() util

This commit is contained in:
Thomas Haller 2017-06-14 13:20:49 +02:00
parent b55fba8fbd
commit bb53b46bd1

View file

@ -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 *
nm_str_not_empty (const char *str)
{