summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-05-07 23:07:14 +0200
committerThomas Haller <thaller@redhat.com>2021-05-14 11:41:32 +0200
commit62027350f7e29447ee7976785ccf56f918a635cc (patch)
treea91791c1710992af6d621d99196ec5ebe17ca014
parentb5c5b2443d2e725e6c23c5931723ba888ee7586e (diff)
downloadNetworkManager-62027350f7e29447ee7976785ccf56f918a635cc.tar.gz
glib-aux: add NM_STRV_EMPTY() helper
NM_PTRARRAY_EMPTY(char*) gives a "char *const*" pointer, which is often not useful where a strv array is needed. Add a helper macro.
-rw-r--r--src/libnm-glib-aux/nm-shared-utils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h
index 699d4d52b2..4d0fa8522a 100644
--- a/src/libnm-glib-aux/nm-shared-utils.h
+++ b/src/libnm-glib-aux/nm-shared-utils.h
@@ -522,6 +522,7 @@ gboolean nm_utils_memeqzero(gconstpointer data, gsize length);
extern const void *const _NM_PTRARRAY_EMPTY[1];
#define NM_PTRARRAY_EMPTY(type) ((type const *) _NM_PTRARRAY_EMPTY)
+#define NM_STRV_EMPTY() ((char **) _NM_PTRARRAY_EMPTY)
static inline void
_nm_utils_strbuf_init(char *buf, gsize len, char **p_buf_ptr, gsize *p_buf_len)