summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared/nm-utils/nm-c-list.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/shared/nm-utils/nm-c-list.h b/shared/nm-utils/nm-c-list.h
index 8352711899..5e0bf102cc 100644
--- a/shared/nm-utils/nm-c-list.h
+++ b/shared/nm-utils/nm-c-list.h
@@ -26,6 +26,13 @@
/*****************************************************************************/
+#define nm_c_list_contains_entry(list, what, member) \
+ ({ \
+ typeof (what) _what = (what); \
+ \
+ _what && c_list_contains (list, &_what->member); \
+ })
+
typedef struct {
CList lst;
void *data;