diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-30 17:42:32 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-05 17:45:30 +0200 |
commit | 422e326cbaa5e04163d1895b287013e2791acb26 (patch) | |
tree | d8fa7ae49a6765654170a66c875d841441144546 /shared/nm-utils/nm-c-list.h | |
parent | 011258a086d3c050d7856addf4fe887e443a53fb (diff) | |
download | NetworkManager-422e326cbaa5e04163d1895b287013e2791acb26.tar.gz |
shared: add nm_c_list_contains_entry() helper
Diffstat (limited to 'shared/nm-utils/nm-c-list.h')
-rw-r--r-- | shared/nm-utils/nm-c-list.h | 7 |
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; |