diff options
-rw-r--r-- | src/tests/cmocka/test_nested_groups.c | 3 | ||||
-rw-r--r-- | src/tests/cmocka/test_nss_srv.c | 3 | ||||
-rw-r--r-- | src/tests/common.h | 2 | ||||
-rw-r--r-- | src/tests/sbus_codegen_tests.c | 3 |
4 files changed, 2 insertions, 9 deletions
diff --git a/src/tests/cmocka/test_nested_groups.c b/src/tests/cmocka/test_nested_groups.c index eef9df2dc..8081ff261 100644 --- a/src/tests/cmocka/test_nested_groups.c +++ b/src/tests/cmocka/test_nested_groups.c @@ -48,9 +48,6 @@ #define GROUP_BASE_DN "cn=groups," OBJECT_BASE_DN #define USER_BASE_DN "cn=users," OBJECT_BASE_DN -#define N_ELEMENTS(arr) \ - (sizeof(arr) / sizeof(arr[0])) - struct nested_groups_test_ctx { struct sss_test_ctx *tctx; diff --git a/src/tests/cmocka/test_nss_srv.c b/src/tests/cmocka/test_nss_srv.c index d1a4c1685..3ab8d39c4 100644 --- a/src/tests/cmocka/test_nss_srv.c +++ b/src/tests/cmocka/test_nss_srv.c @@ -41,9 +41,6 @@ #define TEST_ID_PROVIDER "ldap" #define TEST_DOM_SID "S-1-5-21-444379608-1639770488-2995963434" -#define N_ELEMENTS(arr) \ - (sizeof(arr) / sizeof(arr[0])) - struct nss_test_ctx { struct sss_test_ctx *tctx; struct sss_domain_info *subdom; diff --git a/src/tests/common.h b/src/tests/common.h index 0b351f5d6..1c6de2c3d 100644 --- a/src/tests/common.h +++ b/src/tests/common.h @@ -30,6 +30,8 @@ #include "providers/data_provider.h" #include "providers/ldap/sdap.h" +#define N_ELEMENTS(arr) (sizeof(arr) / sizeof(arr[0])) + extern TALLOC_CTX *global_talloc_context; #define check_leaks(ctx, bytes) _check_leaks((ctx), (bytes), __location__) diff --git a/src/tests/sbus_codegen_tests.c b/src/tests/sbus_codegen_tests.c index 9e9be52e8..4637b92b8 100644 --- a/src/tests/sbus_codegen_tests.c +++ b/src/tests/sbus_codegen_tests.c @@ -33,9 +33,6 @@ #include "tests/sbus_codegen_tests_generated.h" #include "util/util_errors.h" -#define N_ELEMENTS(arr) \ - (sizeof(arr) / sizeof(arr[0])) - /* The following 2 macros were taken from check's project source files (0.9.10) * http://check.sourceforge.net/ */ |