diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-12-04 10:10:37 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-12-04 10:10:37 +0100 |
commit | 621f9324d9d93ea1c1ef6c3677f1aeb4cbfef8ca (patch) | |
tree | 3cc52e1b122dfbed6cbcabcafe52d813a0649b7f /src | |
parent | 36e4aa7b9eb8f4ea3ee27a6df61c3495d87c015b (diff) | |
download | strongswan-621f9324d9d93ea1c1ef6c3677f1aeb4cbfef8ca.tar.bz2 strongswan-621f9324d9d93ea1c1ef6c3677f1aeb4cbfef8ca.tar.xz |
Migrated test_vectors_plugin_t to INIT/METHOD macros
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/plugins/test_vectors/test_vectors_plugin.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/libstrongswan/plugins/test_vectors/test_vectors_plugin.c b/src/libstrongswan/plugins/test_vectors/test_vectors_plugin.c index f3a254d8d..176bc438d 100644 --- a/src/libstrongswan/plugins/test_vectors/test_vectors_plugin.c +++ b/src/libstrongswan/plugins/test_vectors/test_vectors_plugin.c @@ -104,10 +104,8 @@ struct private_test_vectors_plugin_t { test_vectors_plugin_t public; }; -/** - * Implementation of test_vectors_plugin_t.test_vectorstroy - */ -static void destroy(private_test_vectors_plugin_t *this) +METHOD(plugin_t, destroy, void, + private_test_vectors_plugin_t *this) { free(this); } @@ -117,10 +115,16 @@ static void destroy(private_test_vectors_plugin_t *this) */ plugin_t *test_vectors_plugin_create() { - private_test_vectors_plugin_t *this = malloc_thing(private_test_vectors_plugin_t); + private_test_vectors_plugin_t *this; int i; - this->public.plugin.destroy = (void(*)(plugin_t*))destroy; + INIT(this, + .public = { + .plugin = { + .destroy = _destroy, + }, + }, + ); for (i = 0; i < countof(crypter); i++) { |