diff options
author | Thomas Haller <thaller@redhat.com> | 2020-07-05 18:15:34 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-07-06 14:11:23 +0200 |
commit | b9e458b184d3a0a8fe87fd3f1a43eb241702cd78 (patch) | |
tree | 94911ac30654069bd2cd1de935d56b23f9a2d4a4 | |
parent | d407c1271c26d34dc4ffd429d7e838ec30573ece (diff) | |
download | NetworkManager-b9e458b184d3a0a8fe87fd3f1a43eb241702cd78.tar.gz |
shared: add NM_N_ELEMENTS() macro
-rw-r--r-- | shared/nm-std-aux/nm-std-aux.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/nm-std-aux/nm-std-aux.h b/shared/nm-std-aux/nm-std-aux.h index af58741d11..6b1483128a 100644 --- a/shared/nm-std-aux/nm-std-aux.h +++ b/shared/nm-std-aux/nm-std-aux.h @@ -109,6 +109,8 @@ /*****************************************************************************/ +#define NM_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0])) + #define NM_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2 #define NM_PASTE(identifier1,identifier2) NM_PASTE_ARGS (identifier1, identifier2) |