diff options
author | Russell Belfer <arrbee@arrbee.com> | 2011-11-17 15:10:27 -0800 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-11-22 01:53:56 +0100 |
commit | b762e576c6d0118664320f50be2e5810dbed4c15 (patch) | |
tree | 2c244a57ca5167386856c573336093744464daa6 /tests-clay/clay_main.c | |
parent | 1d09a1c88ddde32bf9b6b5ab6a9feab2ecdaa6ff (diff) | |
download | libgit2-b762e576c6d0118664320f50be2e5810dbed4c15.tar.gz |
filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanups
Update all stack allocations of git_filebuf to use GIT_FILEBUF_INIT
and make git_filebuf_open and git_filebuf_cleanup safe to be called
multiple times on the same buffer.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'tests-clay/clay_main.c')
-rw-r--r-- | tests-clay/clay_main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests-clay/clay_main.c b/tests-clay/clay_main.c index 16cc516fa..6d964b1ba 100644 --- a/tests-clay/clay_main.c +++ b/tests-clay/clay_main.c @@ -121,7 +121,10 @@ static const struct clay_func _clay_cb_core_dirent[] = { static const struct clay_func _clay_cb_core_filebuf[] = { {"0", &test_core_filebuf__0}, {"1", &test_core_filebuf__1}, - {"2", &test_core_filebuf__2} + {"2", &test_core_filebuf__2}, + {"3", &test_core_filebuf__3}, + {"4", &test_core_filebuf__4}, + {"5", &test_core_filebuf__5} }; static const struct clay_func _clay_cb_core_oid[] = { {"streq", &test_core_oid__streq} @@ -241,7 +244,7 @@ static const struct clay_suite _clay_suites[] = { "core::filebuf", {NULL, NULL}, {NULL, NULL}, - _clay_cb_core_filebuf, 3 + _clay_cb_core_filebuf, 6 }, { "core::oid", @@ -360,7 +363,7 @@ static const struct clay_suite _clay_suites[] = { }; static size_t _clay_suite_count = 23; -static size_t _clay_callback_count = 67; +static size_t _clay_callback_count = 70; /* Core test functions */ static void |