aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2010-08-17 20:09:32 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2010-08-17 20:09:32 +0200
commit53115857ae5f3b25e889f394de0c61e7cc455c74 (patch)
treef443f4008406a00d076e4ceb470c5a366434902e /src
parentf9a2d4bfcbf697abbf4c90234b5e7bf0d88d1db1 (diff)
downloadstrongswan-53115857ae5f3b25e889f394de0c61e7cc455c74.tar.bz2
strongswan-53115857ae5f3b25e889f394de0c61e7cc455c74.tar.xz
some simplifications using the INIT macro
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/eap_identity/eap_identity.c16
-rw-r--r--src/libcharon/plugins/eap_md5/eap_md5.c16
-rw-r--r--src/libcharon/sa/authenticators/eap_authenticator.c12
3 files changed, 19 insertions, 25 deletions
diff --git a/src/libcharon/plugins/eap_identity/eap_identity.c b/src/libcharon/plugins/eap_identity/eap_identity.c
index 8277184f1..01998e843 100644
--- a/src/libcharon/plugins/eap_identity/eap_identity.c
+++ b/src/libcharon/plugins/eap_identity/eap_identity.c
@@ -182,15 +182,13 @@ eap_identity_t *eap_identity_create_server(identification_t *server,
private_eap_identity_t *this;
INIT(this,
- .public = {
- .eap_method_interface = {
- .initiate = _initiate_server,
- .process = _process_server,
- .get_type = _get_type,
- .is_mutual = _is_mutual,
- .get_msk = _get_msk,
- .destroy = _destroy,
- },
+ .public.eap_method_interface = {
+ .initiate = _initiate_server,
+ .process = _process_server,
+ .get_type = _get_type,
+ .is_mutual = _is_mutual,
+ .get_msk = _get_msk,
+ .destroy = _destroy,
},
.peer = peer->clone(peer),
.identity = chunk_empty,
diff --git a/src/libcharon/plugins/eap_md5/eap_md5.c b/src/libcharon/plugins/eap_md5/eap_md5.c
index 3b0c2c9d4..a74151ac1 100644
--- a/src/libcharon/plugins/eap_md5/eap_md5.c
+++ b/src/libcharon/plugins/eap_md5/eap_md5.c
@@ -267,15 +267,13 @@ eap_md5_t *eap_md5_create_peer(identification_t *server, identification_t *peer)
private_eap_md5_t *this;
INIT(this,
- .public = {
- .eap_method_interface = {
- .initiate = _initiate_peer,
- .process = _process_peer,
- .get_type = _get_type,
- .is_mutual = _is_mutual,
- .get_msk = _get_msk,
- .destroy = _destroy,
- },
+ .public.eap_method_interface = {
+ .initiate = _initiate_peer,
+ .process = _process_peer,
+ .get_type = _get_type,
+ .is_mutual = _is_mutual,
+ .get_msk = _get_msk,
+ .destroy = _destroy,
},
.peer = peer->clone(peer),
.server = server->clone(server),
diff --git a/src/libcharon/sa/authenticators/eap_authenticator.c b/src/libcharon/sa/authenticators/eap_authenticator.c
index 2ad9fd278..23105f640 100644
--- a/src/libcharon/sa/authenticators/eap_authenticator.c
+++ b/src/libcharon/sa/authenticators/eap_authenticator.c
@@ -674,13 +674,11 @@ eap_authenticator_t *eap_authenticator_create_verifier(ike_sa_t *ike_sa,
private_eap_authenticator_t *this;
INIT(this,
- .public = {
- .authenticator = {
- .build = _build_server,
- .process = _process_server,
- .is_mutual = _is_mutual,
- .destroy = _destroy,
- },
+ .public.authenticator = {
+ .build = _build_server,
+ .process = _process_server,
+ .is_mutual = _is_mutual,
+ .destroy = _destroy,
},
.ike_sa = ike_sa,
.received_init = received_init,