some simplifications using the INIT macro
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 17 Aug 2010 18:09:32 +0000 (20:09 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 17 Aug 2010 18:09:32 +0000 (20:09 +0200)
src/libcharon/plugins/eap_identity/eap_identity.c
src/libcharon/plugins/eap_md5/eap_md5.c
src/libcharon/sa/authenticators/eap_authenticator.c

index 8277184..01998e8 100644 (file)
@@ -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,
index 3b0c2c9..a74151a 100644 (file)
@@ -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),
index 2ad9fd2..23105f6 100644 (file)
@@ -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,