diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-11-06 15:13:29 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-11-11 12:10:48 +0100 |
commit | f4bcfcb1b91bfa6a568c4c99c2b3d16cd86090c6 (patch) | |
tree | a24b463c1b15fee4a79e1a6b5ec0ebf70f2240a9 | |
parent | 20a2be57d764f58c4a6532310331e26a3273ada8 (diff) | |
download | sssd-f4bcfcb1b91bfa6a568c4c99c2b3d16cd86090c6.tar.gz sssd-f4bcfcb1b91bfa6a568c4c99c2b3d16cd86090c6.tar.xz sssd-f4bcfcb1b91bfa6a568c4c99c2b3d16cd86090c6.zip |
TESTS: Make check_leaks static function
Reviewed-by: Petr Cech <pcech@redhat.com>
-rw-r--r-- | src/tests/common.h | 5 | ||||
-rw-r--r-- | src/tests/leak_check.c | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/tests/common.h b/src/tests/common.h index c0ceebfbf..ac9ba4026 100644 --- a/src/tests/common.h +++ b/src/tests/common.h @@ -34,11 +34,6 @@ extern TALLOC_CTX *global_talloc_context; -#define check_leaks(ctx, bytes) _check_leaks((ctx), (bytes), __location__) -bool _check_leaks(TALLOC_CTX *ctx, - size_t bytes, - const char *location); - void check_leaks_push(TALLOC_CTX *ctx); #define check_leaks_pop(ctx) _check_leaks_pop((ctx), __location__) diff --git a/src/tests/leak_check.c b/src/tests/leak_check.c index 79c8f05f6..fa153eb54 100644 --- a/src/tests/leak_check.c +++ b/src/tests/leak_check.c @@ -50,8 +50,8 @@ const char *check_leaks_err_msg(void) return leak_err_msg; } -bool -_check_leaks(TALLOC_CTX *ctx, size_t bytes, const char *location) +static bool +check_leaks(TALLOC_CTX *ctx, size_t bytes, const char *location) { size_t bytes_allocated; @@ -110,7 +110,7 @@ _check_leaks_pop(TALLOC_CTX *ctx, const char *location) } talloc_zfree(snapshot); - return _check_leaks(old_ctx, bytes_allocated, location); + return check_leaks(old_ctx, bytes_allocated, location); } bool @@ -140,7 +140,7 @@ leak_check_teardown(void) _set_leak_err_msg("Exiting with a non-empty stack"); return false; } - res = check_leaks(global_talloc_context, 0); + res = check_leaks(global_talloc_context, 0, __location__); talloc_disable_null_tracking(); talloc_free(global_talloc_context); return res; |