Use a seperate section for each nested struct member in INIT macro
This commit is contained in:
@@ -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),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user