aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/ctr
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-08-18 12:15:03 +0200
committerMartin Willi <martin@revosec.ch>2010-08-18 12:15:03 +0200
commitba31fe1fd65feba781434ee4fabd9b1fd6432ecb (patch)
tree3d7073eb9bb51512d073eeccd3f0b3b5d32e1ff5 /src/libstrongswan/plugins/ctr
parent53115857ae5f3b25e889f394de0c61e7cc455c74 (diff)
downloadstrongswan-ba31fe1fd65feba781434ee4fabd9b1fd6432ecb.tar.bz2
strongswan-ba31fe1fd65feba781434ee4fabd9b1fd6432ecb.tar.xz
Use a seperate section for each nested struct member in INIT macro
Diffstat (limited to 'src/libstrongswan/plugins/ctr')
-rw-r--r--src/libstrongswan/plugins/ctr/ctr_ipsec_crypter.c18
-rw-r--r--src/libstrongswan/plugins/ctr/ctr_plugin.c6
2 files changed, 15 insertions, 9 deletions
diff --git a/src/libstrongswan/plugins/ctr/ctr_ipsec_crypter.c b/src/libstrongswan/plugins/ctr/ctr_ipsec_crypter.c
index 5f7666ffa..ddcae423b 100644
--- a/src/libstrongswan/plugins/ctr/ctr_ipsec_crypter.c
+++ b/src/libstrongswan/plugins/ctr/ctr_ipsec_crypter.c
@@ -149,14 +149,16 @@ ctr_ipsec_crypter_t *ctr_ipsec_crypter_create(encryption_algorithm_t algo,
}
INIT(this,
- .public.crypter = {
- .encrypt = _crypt,
- .decrypt = _crypt,
- .get_block_size = _get_block_size,
- .get_iv_size = _get_iv_size,
- .get_key_size = _get_key_size,
- .set_key = _set_key,
- .destroy = _destroy,
+ .public = {
+ .crypter = {
+ .encrypt = _crypt,
+ .decrypt = _crypt,
+ .get_block_size = _get_block_size,
+ .get_iv_size = _get_iv_size,
+ .get_key_size = _get_key_size,
+ .set_key = _set_key,
+ .destroy = _destroy,
+ },
},
.crypter = lib->crypto->create_crypter(lib->crypto, algo, key_size),
);
diff --git a/src/libstrongswan/plugins/ctr/ctr_plugin.c b/src/libstrongswan/plugins/ctr/ctr_plugin.c
index d9ff436e2..5e47f23ec 100644
--- a/src/libstrongswan/plugins/ctr/ctr_plugin.c
+++ b/src/libstrongswan/plugins/ctr/ctr_plugin.c
@@ -49,7 +49,11 @@ plugin_t *ctr_plugin_create()
private_ctr_plugin_t *this;
INIT(this,
- .public.plugin.destroy = _destroy,
+ .public = {
+ .plugin = {
+ .destroy = _destroy,
+ },
+ },
);
lib->crypto->add_crypter(lib->crypto, ENCR_AES_CTR,