aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/blowfish/blowfish_plugin.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-08-13 11:40:13 +0200
committerMartin Willi <martin@revosec.ch>2010-08-13 17:11:53 +0200
commit00c7e9af17d38f5173fae7c9c235289411c17c12 (patch)
treed696875073e7e494953170cd1ee03dd6a5ed7598 /src/libstrongswan/plugins/blowfish/blowfish_plugin.c
parent1fff2afe57773e519f2f4642f63580aca4f25d73 (diff)
downloadstrongswan-00c7e9af17d38f5173fae7c9c235289411c17c12.tar.bz2
strongswan-00c7e9af17d38f5173fae7c9c235289411c17c12.tar.xz
Migrated blowfish plugin to INIT/METHOD macros
Diffstat (limited to 'src/libstrongswan/plugins/blowfish/blowfish_plugin.c')
-rw-r--r--src/libstrongswan/plugins/blowfish/blowfish_plugin.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstrongswan/plugins/blowfish/blowfish_plugin.c b/src/libstrongswan/plugins/blowfish/blowfish_plugin.c
index f9fb605b3..b4b92c8c5 100644
--- a/src/libstrongswan/plugins/blowfish/blowfish_plugin.c
+++ b/src/libstrongswan/plugins/blowfish/blowfish_plugin.c
@@ -32,10 +32,8 @@ struct private_blowfish_plugin_t {
blowfish_plugin_t public;
};
-/**
- * Implementation of blowfish_plugin_t.destroy
- */
-static void destroy(private_blowfish_plugin_t *this)
+METHOD(plugin_t, destroy, void,
+ private_blowfish_plugin_t *this)
{
lib->crypto->remove_crypter(lib->crypto,
(crypter_constructor_t)blowfish_crypter_create);
@@ -47,9 +45,11 @@ static void destroy(private_blowfish_plugin_t *this)
*/
plugin_t *blowfish_plugin_create()
{
- private_blowfish_plugin_t *this = malloc_thing(private_blowfish_plugin_t);
+ private_blowfish_plugin_t *this;
- this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
+ INIT(this,
+ .public.plugin.destroy = _destroy,
+ );
lib->crypto->add_crypter(lib->crypto, ENCR_BLOWFISH,
(crypter_constructor_t)blowfish_crypter_create);