diff --git a/include/nm-macros-internal.h b/include/nm-macros-internal.h index c65f9e0439..4f558558bf 100644 --- a/include/nm-macros-internal.h +++ b/include/nm-macros-internal.h @@ -250,4 +250,13 @@ _NM_BACKPORT_SYMBOL_IMPL(VERSION, RETURN_TYPE, FUNC, _##FUNC##_##VERSION, ARGS_T /*****************************************************************************/ +static inline char * +nm_strstrip (char *str) +{ + /* g_strstrip doesn't like NULL. */ + return str ? g_strstrip (str) : NULL; +} + +/*****************************************************************************/ + #endif /* __NM_MACROS_INTERNAL_H__ */