diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-03-25 10:03:43 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-07-15 17:32:08 +0200 |
commit | 429f8454a40b939604e9a96d780661a94a38da2e (patch) | |
tree | 42d06f712c5ac6bd569adb1aa939b0081f5131f2 /src/tests/common.h | |
parent | b1bea7c3d202eb3b53e219c9ccb83161ce47ca6a (diff) | |
download | sssd-429f8454a40b939604e9a96d780661a94a38da2e.tar.gz sssd-429f8454a40b939604e9a96d780661a94a38da2e.tar.xz sssd-429f8454a40b939604e9a96d780661a94a38da2e.zip |
tests: Move N_ELEMENTS definition to tests/common.h
Avoids code duplication
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/tests/common.h')
-rw-r--r-- | src/tests/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
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__) |