diff --git a/HACKING b/HACKING
index 00af80e1..f02aa166 100644
--- a/HACKING
+++ b/HACKING
@@ -51,14 +51,6 @@ Coding Style
message(G_LOG_LEVEL_MESSAGE, "Ok");
}
-- Use round brackets ``()`` for ``return``.
-
- Examples:
- BAD:
- ``return 0;``
- GOOD:
- ``return(0);``
-
- Check for memory leaks.
I recommend valgrind (http://valgrind.kde.org) utility with options:
--leak-check=yes
diff --git a/lasso/Attic/protocols/artifact.c b/lasso/Attic/protocols/artifact.c
index 003770f5..744d181e 100644
--- a/lasso/Attic/protocols/artifact.c
+++ b/lasso/Attic/protocols/artifact.c
@@ -43,7 +43,7 @@ lasso_artifact_split_samlArt(gchar *b64_samlArt,
/* decode samlArt */
i = xmlSecBase64Decode((const xmlChar *)b64_samlArt, samlArt, 42+1);
if (i < 0 || i > 42) {
- return(-1);
+ return -1;
}
/* extract ByteCode, IdentityProviderSuccinctID and AssertionHandle */
for(j=0; j<42; j++) {
@@ -59,7 +59,7 @@ lasso_artifact_split_samlArt(gchar *b64_samlArt,
}
sprintf(byteCode, "%d", byte_code);
- return(0);
+ return 0;
}
/*****************************************************************************/
@@ -93,7 +93,7 @@ lasso_artifact_get_assertionHandle(LassoArtifact *artifact,
g_propagate_error (err, tmp_err);
}
- return (assertionHandle);
+ return assertionHandle;
}
/**
@@ -132,13 +132,13 @@ lasso_artifact_get_byteCode(LassoArtifact *artifact,
"ByteCode", NULL, &tmp_err);
if (byteCode == NULL) {
g_propagate_error (err, tmp_err);
- return (-1);
+ return -1;
}
ret = (gint)g_strtod(byteCode, NULL);
xmlFree(byteCode);
- return (ret);
+ return ret;
}
xmlChar*
@@ -168,7 +168,7 @@ lasso_artifact_get_b64IdentityProviderSuccinctID(LassoArtifact *artifact,
g_propagate_error (err, tmp_err);
}
- return(b64_identityProviderSuccinctID);
+ return b64_identityProviderSuccinctID;
}
xmlChar*
@@ -197,7 +197,7 @@ lasso_artifact_get_relayState(LassoArtifact *artifact,
g_propagate_error (err, tmp_err);
}
- return (relayState);
+ return relayState;
}
xmlChar*
@@ -226,7 +226,7 @@ lasso_artifact_get_samlArt(LassoArtifact *artifact,
g_propagate_error (err, tmp_err);
}
- return (samlArt);
+ return samlArt;
}
/*****************************************************************************/
@@ -299,7 +299,7 @@ lasso_artifact_new(gchar *samlArt,
class->new_child(artifact, "RelayState", relayState, FALSE);
}
- return (artifact);
+ return artifact;
}
LassoNode*
@@ -344,7 +344,7 @@ lasso_artifact_new_from_query(const xmlChar *query)
g_free(b64_samlArt);
g_free(relayState);
- return (artifact);
+ return artifact;
}
LassoNode*
@@ -373,5 +373,5 @@ lasso_artifact_new_from_lares(const xmlChar *lares,
g_free(identityProviderSuccinctID);
g_free(assertionHandle);
- return (artifact);
+ return artifact;
}
diff --git a/lasso/Attic/protocols/authn_request.c b/lasso/Attic/protocols/authn_request.c
index f1a9c52a..d755f9ef 100644
--- a/lasso/Attic/protocols/authn_request.c
+++ b/lasso/Attic/protocols/authn_request.c
@@ -40,7 +40,7 @@ lasso_authn_request_get_protocolProfile(gchar *query)
if (protocolProfile == NULL)
protocolProfile = (gchar *)lassoLibProtocolProfileBrwsArt;
- return (protocolProfile);
+ return protocolProfile;
}
/*****************************************************************************/
@@ -188,7 +188,7 @@ lasso_authn_request_new(const xmlChar *providerID,
lasso_lib_authn_request_set_providerID(LASSO_LIB_AUTHN_REQUEST(request),
providerID);
- return (request);
+ return request;
}
LassoNode*
@@ -215,7 +215,7 @@ lasso_authn_request_new_from_export(gchar *buffer,
gd = lasso_query_to_dict(buffer);
if (gd == NULL) {
g_object_unref(request);
- return(NULL);
+ return NULL;
}
/* RequestID */
@@ -226,7 +226,7 @@ lasso_authn_request_new_from_export(gchar *buffer,
else {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
/* MajorVersion */
@@ -256,7 +256,7 @@ lasso_authn_request_new_from_export(gchar *buffer,
else {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
/* ProviderID */
@@ -266,7 +266,7 @@ lasso_authn_request_new_from_export(gchar *buffer,
else {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
/* NameIDPolicy */
@@ -377,5 +377,5 @@ lasso_authn_request_new_from_export(gchar *buffer,
break;
}
- return (request);
+ return request;
}
diff --git a/lasso/Attic/protocols/authn_request_envelope.c b/lasso/Attic/protocols/authn_request_envelope.c
index 84035360..fb00a3c8 100644
--- a/lasso/Attic/protocols/authn_request_envelope.c
+++ b/lasso/Attic/protocols/authn_request_envelope.c
@@ -41,7 +41,7 @@ LassoNode *lasso_authn_request_envelope_get_authnRequest(LassoAuthnRequestEnvelo
{
g_return_val_if_fail(LASSO_IS_AUTHN_REQUEST_ENVELOPE(request), NULL);
- return(lasso_node_get_child(LASSO_NODE(request), "AuthnRequest", NULL, NULL));
+ return lasso_node_get_child(LASSO_NODE(request), "AuthnRequest", NULL, NULL);
}
/*****************************************************************************/
@@ -101,7 +101,7 @@ lasso_authn_request_envelope_new(LassoAuthnRequest *authnRequest,
lasso_lib_authn_request_envelope_set_assertionConsumerServiceURL(LASSO_LIB_AUTHN_REQUEST_ENVELOPE(request),
assertionConsumerServiceURL);
- return(request);
+ return request;
}
LassoNode*
@@ -132,5 +132,5 @@ lasso_authn_request_envelope_new_from_export(gchar *buffer,
break;
}
- return(request);
+ return request;
}
diff --git a/lasso/Attic/protocols/authn_response.c b/lasso/Attic/protocols/authn_response.c
index ab1b81e2..3c915f00 100644
--- a/lasso/Attic/protocols/authn_response.c
+++ b/lasso/Attic/protocols/authn_response.c
@@ -66,15 +66,15 @@ lasso_authn_response_get_status(LassoAuthnResponse *response) {
if (err != NULL) {
message(G_LOG_LEVEL_WARNING, err->message);
g_error_free(err);
- return (NULL);
+ return NULL;
}
else {
- return (value);
+ return value;
}
}
else {
message(G_LOG_LEVEL_WARNING, "No StatusCode element found in AuthnResponse.\n");
- return (NULL);
+ return NULL;
}
}
@@ -161,7 +161,7 @@ lasso_authn_response_new(char *providerID,
/* Status Code */
lasso_authn_response_set_status(LASSO_AUTHN_RESPONSE(response), lassoSamlStatusCodeSuccess);
- return(response);
+ return response;
}
LassoNode*
@@ -190,5 +190,5 @@ lasso_authn_response_new_from_export(gchar *buffer,
break;
}
- return (response);
+ return response;
}
diff --git a/lasso/Attic/protocols/authn_response_envelope.c b/lasso/Attic/protocols/authn_response_envelope.c
index 3cd8130a..378f09e6 100644
--- a/lasso/Attic/protocols/authn_response_envelope.c
+++ b/lasso/Attic/protocols/authn_response_envelope.c
@@ -39,14 +39,14 @@ xmlChar *lasso_authn_response_envelope_get_assertionConsumerServiceURL(LassoAuth
{
g_return_val_if_fail(LASSO_IS_AUTHN_RESPONSE_ENVELOPE(response), NULL);
- return(lasso_node_get_child_content(LASSO_NODE(response), "AssertionConsumerServiceURL", NULL, NULL));
+ return lasso_node_get_child_content(LASSO_NODE(response), "AssertionConsumerServiceURL", NULL, NULL);
}
LassoNode* lasso_authn_response_envelope_get_authnResponse(LassoAuthnResponseEnvelope *response)
{
g_return_val_if_fail(LASSO_IS_AUTHN_RESPONSE_ENVELOPE(response), NULL);
- return(lasso_node_get_child(LASSO_NODE(response), "AuthnResponse", NULL, NULL));
+ return lasso_node_get_child(LASSO_NODE(response), "AuthnResponse", NULL, NULL);
}
/*****************************************************************************/
@@ -102,7 +102,7 @@ lasso_authn_response_envelope_new(LassoAuthnResponse *authnResponse,
lasso_lib_authn_response_envelope_set_assertionConsumerServiceURL(LASSO_LIB_AUTHN_RESPONSE_ENVELOPE(response),
assertionConsumerServiceURL);
- return(response);
+ return response;
}
static LassoNode *
@@ -126,7 +126,7 @@ lasso_authn_response_envelope_new_from_soap(gchar *buffer)
class->set_xmlNode(LASSO_NODE(response), xmlNode_response);
lasso_node_destroy(envelope);
- return(response);
+ return response;
}
LassoNode*
@@ -151,9 +151,9 @@ lasso_authn_response_envelope_new_from_export(gchar *buffer,
break;
default:
message(G_LOG_LEVEL_CRITICAL, "Invalid export type\n");
- return(NULL);
+ return NULL;
break;
}
- return(response);
+ return response;
}
diff --git a/lasso/Attic/protocols/elements/assertion.c b/lasso/Attic/protocols/elements/assertion.c
index 950ca5c8..027559af 100644
--- a/lasso/Attic/protocols/elements/assertion.c
+++ b/lasso/Attic/protocols/elements/assertion.c
@@ -100,5 +100,5 @@ lasso_assertion_new(const xmlChar *issuer,
requestID);
}
- return (assertion);
+ return assertion;
}
diff --git a/lasso/Attic/protocols/elements/authentication_statement.c b/lasso/Attic/protocols/elements/authentication_statement.c
index 8c6dbedd..22b814d7 100644
--- a/lasso/Attic/protocols/elements/authentication_statement.c
+++ b/lasso/Attic/protocols/elements/authentication_statement.c
@@ -102,7 +102,7 @@ lasso_authentication_statement_new(const xmlChar *authenticationMethod
else {
message(G_LOG_LEVEL_CRITICAL, "Failed to create the authentication statement, both name identifiers are NULL\n");
lasso_node_destroy(statement);
- return (NULL);
+ return NULL;
}
}
else {
@@ -145,5 +145,5 @@ lasso_authentication_statement_new(const xmlChar *authenticationMethod
lasso_node_destroy(subject);
lasso_node_destroy(subject_confirmation);
- return (statement);
+ return statement;
}
diff --git a/lasso/Attic/protocols/federation.c b/lasso/Attic/protocols/federation.c
index 800a24ff..c6e6c431 100644
--- a/lasso/Attic/protocols/federation.c
+++ b/lasso/Attic/protocols/federation.c
@@ -52,7 +52,7 @@ lasso_federation_copy(LassoFederation *federation)
copy->remote_nameIdentifier = lasso_node_copy(federation->remote_nameIdentifier);
}
- return(copy);
+ return copy;
}
void
@@ -105,17 +105,17 @@ lasso_federation_dump(LassoFederation *federation)
dump = lasso_node_export(federation_node);
lasso_node_destroy(federation_node);
- return(dump);
+ return dump;
}
LassoNode *
lasso_federation_get_local_nameIdentifier(LassoFederation *federation)
{
if (federation->local_nameIdentifier != NULL) {
- return (lasso_node_copy(federation->local_nameIdentifier));
+ return lasso_node_copy(federation->local_nameIdentifier);
}
else {
- return (NULL);
+ return NULL;
}
}
@@ -123,10 +123,10 @@ LassoNode *
lasso_federation_get_remote_nameIdentifier(LassoFederation *federation)
{
if (federation->remote_nameIdentifier != NULL) {
- return(lasso_node_copy(federation->remote_nameIdentifier));
+ return lasso_node_copy(federation->remote_nameIdentifier);
}
else {
- return (NULL);
+ return NULL;
}
}
@@ -172,7 +172,7 @@ lasso_federation_verify_nameIdentifier(LassoFederation *federation,
NULL);
if(xmlStrEqual(federation_content, nameIdentifier_content)) {
xmlFree(federation_content);
- return(TRUE);
+ return TRUE;
}
xmlFree(federation_content);
}
@@ -181,13 +181,13 @@ lasso_federation_verify_nameIdentifier(LassoFederation *federation,
NULL);
if(xmlStrEqual(federation_content, nameIdentifier_content)) {
xmlFree(federation_content);
- return(TRUE);
+ return TRUE;
}
xmlFree(federation_content);
}
xmlFree(nameIdentifier_content);
- return(FALSE);
+ return FALSE;
}
/*****************************************************************************/
@@ -282,7 +282,7 @@ lasso_federation_new(gchar *remote_providerID)
federation->remote_providerID = g_strdup(remote_providerID);
- return(federation);
+ return federation;
}
LassoFederation*
@@ -294,5 +294,5 @@ lasso_federation_new_from_dump(gchar *dump)
federation = LASSO_FEDERATION(g_object_new(LASSO_TYPE_FEDERATION, NULL));
- return(federation);
+ return federation;
}
diff --git a/lasso/Attic/protocols/federation_termination_notification.c b/lasso/Attic/protocols/federation_termination_notification.c
index 86ddbbf8..fa14189a 100644
--- a/lasso/Attic/protocols/federation_termination_notification.c
+++ b/lasso/Attic/protocols/federation_termination_notification.c
@@ -118,7 +118,7 @@ lasso_federation_termination_notification_new(const xmlChar *providerID,
LASSO_SAML_NAME_IDENTIFIER(identifier));
lasso_node_destroy(identifier);
- return (request);
+ return request;
}
LassoNode *
@@ -133,7 +133,7 @@ lasso_federation_termination_notification_new_from_query(const gchar *query)
gd = lasso_query_to_dict(query);
if (gd == NULL) {
g_object_unref(notification);
- return(NULL);
+ return NULL;
}
/* RequestID */
@@ -141,7 +141,7 @@ lasso_federation_termination_notification_new_from_query(const gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(notification);
- return (NULL);
+ return NULL;
}
lasso_samlp_request_abstract_set_requestID(LASSO_SAMLP_REQUEST_ABSTRACT(notification), str);
@@ -159,7 +159,7 @@ lasso_federation_termination_notification_new_from_query(const gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(notification);
- return (NULL);
+ return NULL;
}
lasso_samlp_request_abstract_set_minorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(notification), str);
@@ -168,7 +168,7 @@ lasso_federation_termination_notification_new_from_query(const gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(notification);
- return (NULL);
+ return NULL;
}
lasso_samlp_request_abstract_set_issueInstant(LASSO_SAMLP_REQUEST_ABSTRACT(notification), str);
@@ -177,7 +177,7 @@ lasso_federation_termination_notification_new_from_query(const gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(notification);
- return (NULL);
+ return NULL;
}
lasso_lib_federation_termination_notification_set_providerID(LASSO_LIB_FEDERATION_TERMINATION_NOTIFICATION(notification), str);
@@ -186,21 +186,21 @@ lasso_federation_termination_notification_new_from_query(const gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(notification);
- return (NULL);
+ return NULL;
}
identifier = lasso_saml_name_identifier_new(str);
str = lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "NameQualifier"), 0);
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(notification);
- return (NULL);
+ return NULL;
}
lasso_saml_name_identifier_set_nameQualifier(LASSO_SAML_NAME_IDENTIFIER(identifier), str);
str = lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "Format"), 0);
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(notification);
- return (NULL);
+ return NULL;
}
lasso_saml_name_identifier_set_format(LASSO_SAML_NAME_IDENTIFIER(identifier), str);
@@ -209,7 +209,7 @@ lasso_federation_termination_notification_new_from_query(const gchar *query)
lasso_node_destroy(identifier);
- return(notification);
+ return notification;
}
LassoNode *
@@ -234,7 +234,7 @@ lasso_federation_termination_notification_new_from_soap(const gchar *buffer)
class->set_xmlNode(LASSO_NODE(notification), xmlNode_notification);
lasso_node_destroy(envelope);
- return(notification);
+ return notification;
}
@@ -254,8 +254,8 @@ lasso_federation_termination_notification_new_from_export(const gchar *b
notification = lasso_federation_termination_notification_new_from_soap(buffer);
break;
default:
- return(NULL);
+ return NULL;
}
- return(notification);
+ return notification;
}
diff --git a/lasso/Attic/protocols/logout_request.c b/lasso/Attic/protocols/logout_request.c
index e93c5cdf..d33a5f51 100644
--- a/lasso/Attic/protocols/logout_request.c
+++ b/lasso/Attic/protocols/logout_request.c
@@ -141,7 +141,7 @@ lasso_logout_request_new(gchar *providerID,
LASSO_SAML_NAME_IDENTIFIER(identifier));
lasso_node_destroy(identifier);
- return(request);
+ return request;
}
static LassoNode *
@@ -156,7 +156,7 @@ lasso_logout_request_new_from_query(gchar *query)
gd = lasso_query_to_dict(query);
if (gd == NULL) {
g_object_unref(request);
- return(NULL);
+ return NULL;
}
/* RequestID */
@@ -164,7 +164,7 @@ lasso_logout_request_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
lasso_samlp_request_abstract_set_requestID(LASSO_SAMLP_REQUEST_ABSTRACT(request), str);
@@ -174,7 +174,7 @@ lasso_logout_request_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
/* MinorVersion */
@@ -182,7 +182,7 @@ lasso_logout_request_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
lasso_samlp_request_abstract_set_minorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(request), str);
@@ -191,7 +191,7 @@ lasso_logout_request_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
lasso_samlp_request_abstract_set_issueInstant(LASSO_SAMLP_REQUEST_ABSTRACT(request), str);
@@ -200,7 +200,7 @@ lasso_logout_request_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
lasso_lib_logout_request_set_providerID(LASSO_LIB_LOGOUT_REQUEST(request), str);
@@ -209,21 +209,21 @@ lasso_logout_request_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
identifier = lasso_saml_name_identifier_new(str);
str = lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "NameQualifier"), 0);
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
lasso_saml_name_identifier_set_nameQualifier(LASSO_SAML_NAME_IDENTIFIER(identifier), str);
str = lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "Format"), 0);
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(request);
- return (NULL);
+ return NULL;
}
lasso_saml_name_identifier_set_format(LASSO_SAML_NAME_IDENTIFIER(identifier), str);
lasso_lib_logout_request_set_nameIdentifier(LASSO_LIB_LOGOUT_REQUEST(request), LASSO_SAML_NAME_IDENTIFIER(identifier));
@@ -246,7 +246,7 @@ lasso_logout_request_new_from_query(gchar *query)
g_datalist_clear(&gd);
- return(request);
+ return request;
}
static LassoNode *
@@ -271,7 +271,7 @@ lasso_logout_request_new_from_soap(gchar *buffer)
class->set_xmlNode(LASSO_NODE(request), xmlNode_request);
lasso_node_destroy(envelope);
- return(request);
+ return request;
}
static LassoNode *
@@ -291,7 +291,7 @@ lasso_logout_request_new_from_xml(gchar *buffer)
class->set_xmlNode(LASSO_NODE(request), xmlNode_request);
lasso_node_destroy(lassoNode_request);
- return(request);
+ return request;
}
@@ -318,5 +318,5 @@ lasso_logout_request_new_from_export(gchar *buffer,
break;
}
- return(request);
+ return request;
}
diff --git a/lasso/Attic/protocols/logout_response.c b/lasso/Attic/protocols/logout_response.c
index fa2fb1bb..9fe18255 100644
--- a/lasso/Attic/protocols/logout_response.c
+++ b/lasso/Attic/protocols/logout_response.c
@@ -44,15 +44,15 @@ lasso_logout_response_get_status_code_value(LassoLogoutResponse *response)
if (err != NULL) {
message(G_LOG_LEVEL_WARNING, err->message);
g_error_free(err);
- return (NULL);
+ return NULL;
}
else {
- return (value);
+ return value;
}
}
else {
message(G_LOG_LEVEL_WARNING, "No StatusCode element found in Response.\n");
- return (NULL);
+ return NULL;
}
}
@@ -163,7 +163,7 @@ lasso_logout_response_new(gchar *providerID,
lasso_node_destroy(ssc);
lasso_node_destroy(ss);
- return (response);
+ return response;
}
LassoNode *
@@ -174,7 +174,7 @@ lasso_logout_response_new_from_dump(gchar *buffer)
response = LASSO_NODE(g_object_new(LASSO_TYPE_LOGOUT_RESPONSE, NULL));
lasso_node_import(response, buffer);
- return (response);
+ return response;
}
LassoNode *
@@ -189,7 +189,7 @@ lasso_logout_response_new_from_query(gchar *query)
gd = lasso_query_to_dict(query);
if (gd == NULL) {
g_object_unref(response);
- return(NULL);
+ return NULL;
}
/* ResponseID */
@@ -197,7 +197,7 @@ lasso_logout_response_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(response);
- return (NULL);
+ return NULL;
}
lasso_samlp_response_abstract_set_responseID(LASSO_SAMLP_RESPONSE_ABSTRACT(response), str);
@@ -206,7 +206,7 @@ lasso_logout_response_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(response);
- return (NULL);
+ return NULL;
}
lasso_samlp_response_abstract_set_majorVersion(LASSO_SAMLP_RESPONSE_ABSTRACT(response), str);
@@ -219,7 +219,7 @@ lasso_logout_response_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(response);
- return (NULL);
+ return NULL;
}
lasso_samlp_response_abstract_set_issueInstant(LASSO_SAMLP_RESPONSE_ABSTRACT(response), str);
@@ -228,7 +228,7 @@ lasso_logout_response_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(response);
- return (NULL);
+ return NULL;
}
lasso_samlp_response_abstract_set_inResponseTo(LASSO_SAMLP_RESPONSE_ABSTRACT(response), str);
@@ -237,7 +237,7 @@ lasso_logout_response_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(response);
- return (NULL);
+ return NULL;
}
lasso_samlp_response_abstract_set_recipient(LASSO_SAMLP_RESPONSE_ABSTRACT(response), str);
@@ -246,7 +246,7 @@ lasso_logout_response_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(response);
- return (NULL);
+ return NULL;
}
lasso_lib_status_response_set_providerID(LASSO_LIB_STATUS_RESPONSE(response), str);
@@ -255,7 +255,7 @@ lasso_logout_response_new_from_query(gchar *query)
if (str == NULL) {
g_datalist_clear(&gd);
g_object_unref(response);
- return (NULL);
+ return NULL;
}
ss = lasso_samlp_status_new();
ssc = lasso_samlp_status_code_new();
@@ -276,7 +276,7 @@ lasso_logout_response_new_from_query(gchar *query)
g_datalist_clear(&gd);
- return(response);
+ return response;
}
LassoNode *
@@ -292,14 +292,14 @@ lasso_logout_response_new_from_soap(gchar *buffer)
envelope = lasso_node_new_from_dump(buffer);
if(envelope == NULL) {
message(G_LOG_LEVEL_WARNING, "Error while parsing the soap msg\n");
- return(NULL);
+ return NULL;
}
lassoNode_response = lasso_node_get_child(envelope, "LogoutResponse",
NULL, NULL);
if(lassoNode_response == NULL) {
message(G_LOG_LEVEL_WARNING, "LogoutResponse node not found\n");
- return(NULL);
+ return NULL;
}
class = LASSO_NODE_GET_CLASS(lassoNode_response);
xmlNode_response = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_response)), 1);
@@ -309,7 +309,7 @@ lasso_logout_response_new_from_soap(gchar *buffer)
class->set_xmlNode(LASSO_NODE(response), xmlNode_response);
lasso_node_destroy(envelope);
- return(response);
+ return response;
}
static LassoNode *
@@ -329,7 +329,7 @@ lasso_logout_response_new_from_xml(gchar *buffer)
class->set_xmlNode(LASSO_NODE(response), xmlNode_response);
lasso_node_destroy(lassoNode_response);
- return(response);
+ return response;
}
LassoNode*
@@ -352,8 +352,8 @@ lasso_logout_response_new_from_export(gchar *buffer,
break;
default:
message(G_LOG_LEVEL_WARNING, "Invalid export type\n");
- return(NULL);
+ return NULL;
}
- return(response);
+ return response;
}
diff --git a/lasso/Attic/protocols/name_identifier_mapping_request.c b/lasso/Attic/protocols/name_identifier_mapping_request.c
index 7821afcb..ae2b7457 100644
--- a/lasso/Attic/protocols/name_identifier_mapping_request.c
+++ b/lasso/Attic/protocols/name_identifier_mapping_request.c
@@ -114,7 +114,7 @@ lasso_name_identifier_mapping_request_new(const xmlChar *providerID,
LASSO_SAML_NAME_IDENTIFIER(identifier));
lasso_node_destroy(identifier);
- return (request);
+ return request;
}
LassoNode *
@@ -167,7 +167,7 @@ lasso_name_identifier_mapping_request_new_from_query(const gchar *query)
g_datalist_clear(&gd);
- return(request);
+ return request;
}
LassoNode *
@@ -192,5 +192,5 @@ lasso_name_identifier_mapping_request_new_from_soap(const gchar *buffer)
class->set_xmlNode(LASSO_NODE(request), xmlNode_request);
lasso_node_destroy(envelope);
- return(request);
+ return request;
}
diff --git a/lasso/Attic/protocols/name_identifier_mapping_response.c b/lasso/Attic/protocols/name_identifier_mapping_response.c
index 7a36115d..754fc2eb 100644
--- a/lasso/Attic/protocols/name_identifier_mapping_response.c
+++ b/lasso/Attic/protocols/name_identifier_mapping_response.c
@@ -121,7 +121,7 @@ lasso_name_identifier_mapping_response_new(const xmlChar *providerID,
lasso_node_destroy(ssc);
lasso_node_destroy(ss);
- return (response);
+ return response;
}
LassoNode *
@@ -132,7 +132,7 @@ lasso_name_identifier_mapping_response_new_from_dump(const gchar *buffer)
response = LASSO_NODE(g_object_new(LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE, NULL));
lasso_node_import(response, buffer);
- return (response);
+ return response;
}
/* build a NameIdentifierMappingResponse from a query form NameIdentifierMappingResponse */
@@ -177,7 +177,7 @@ lasso_name_identifier_mapping_response_new_from_query(const gchar *query)
g_datalist_clear(&gd);
- return(response);
+ return response;
}
/* build a NameIdentifierMappingRespose from a soap form NameIdentifierMappingRequest */
@@ -195,7 +195,7 @@ lasso_name_identifier_mapping_response_new_from_request_soap(const gchar *buff
request);
lasso_node_destroy(request);
- return(response);
+ return response;
}
LassoNode *
@@ -220,7 +220,7 @@ lasso_name_identifier_mapping_response_new_from_soap(const gchar *buffer)
class->set_xmlNode(LASSO_NODE(response), xmlNode_response);
lasso_node_destroy(envelope);
- return(response);
+ return response;
}
/* build a NameIdentifierMappingResponse from a query form NameIdentifierMappingRequest */
@@ -238,5 +238,5 @@ lasso_name_identifier_mapping_response_new_from_request_query(const gchar *que
request);
lasso_node_destroy(request);
- return(response);
+ return response;
}
diff --git a/lasso/Attic/protocols/provider.c b/lasso/Attic/protocols/provider.c
index cee40322..cdfb9ed5 100644
--- a/lasso/Attic/protocols/provider.c
+++ b/lasso/Attic/protocols/provider.c
@@ -49,7 +49,7 @@ lasso_provider_copy(LassoProvider *provider)
copy->public_key = g_strdup(provider->public_key);
copy->ca_certificate = g_strdup(provider->ca_certificate);
- return(copy);
+ return copy;
}
void
@@ -87,7 +87,7 @@ lasso_provider_dump(LassoProvider *provider)
lasso_node_destroy(provider_node);
- return(provider_dump);
+ return provider_dump;
}
gchar *
@@ -135,7 +135,7 @@ lasso_provider_get_metadata_value(LassoProvider *provider,
}
if (descriptor == NULL) {
g_propagate_error (err, tmp_err);
- return (NULL);
+ return NULL;
}
content = lasso_node_get_child_content(descriptor, name, NULL, &tmp_err);
@@ -148,7 +148,7 @@ lasso_provider_get_metadata_value(LassoProvider *provider,
xmlFree(content);
}
- return (result);
+ return result;
}
gchar *
@@ -174,7 +174,7 @@ lasso_provider_get_assertionConsumerServiceURL(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -199,7 +199,7 @@ lasso_provider_get_authnRequestsSigned(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -225,7 +225,7 @@ lasso_provider_get_federationTerminationNotificationProtocolProfile(LassoProvide
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -251,7 +251,7 @@ lasso_provider_get_federationTerminationServiceReturnURL(LassoProvider *pro
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -277,7 +277,7 @@ lasso_provider_get_federationTerminationServiceURL(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -303,7 +303,7 @@ lasso_provider_get_nameIdentifierMappingProtocolProfile(LassoProvider *prov
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -318,7 +318,7 @@ lasso_provider_get_providerID(LassoProvider *provider)
if (descriptor == NULL) {
message(G_LOG_LEVEL_CRITICAL, err->message);
g_error_free(err);
- return (NULL);
+ return NULL;
}
value = lasso_node_get_attr_value(descriptor, "providerID", &err);
@@ -330,7 +330,7 @@ lasso_provider_get_providerID(LassoProvider *provider)
g_error_free(err);
}
- return (value);
+ return value;
}
gchar *
@@ -356,7 +356,7 @@ lasso_provider_get_registerNameIdentifierProtocolProfile(LassoProvider *pro
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -382,7 +382,7 @@ lasso_provider_get_registerNameIdentifierServiceURL(LassoProvider *provider
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -407,7 +407,7 @@ lasso_provider_get_singleSignOnProtocolProfile(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -432,7 +432,7 @@ lasso_provider_get_singleSignOnServiceURL(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -458,7 +458,7 @@ lasso_provider_get_singleLogoutProtocolProfile(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -484,7 +484,7 @@ lasso_provider_get_singleLogoutServiceURL(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -510,7 +510,7 @@ lasso_provider_get_singleLogoutServiceReturnURL(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
gchar *
@@ -536,7 +536,7 @@ lasso_provider_get_soapEndpoint(LassoProvider *provider,
g_propagate_error (err, tmp_err);
}
- return (value);
+ return value;
}
void
@@ -565,12 +565,12 @@ static gchar *lasso_provider_get_direct_child_content(LassoProvider *provider,
node = lasso_node_get_child(LASSO_NODE(provider), name, NULL, NULL);
if(node == NULL) {
- return(NULL);
+ return NULL;
}
content = lasso_node_get_content(node, NULL);
lasso_node_destroy(node);
- return(content);
+ return content;
}
/*****************************************************************************/
@@ -665,7 +665,7 @@ lasso_provider_new(gchar *metadata,
provider->ca_certificate = g_strdup(ca_certificate);
}
- return(provider);
+ return provider;
}
@@ -677,7 +677,7 @@ lasso_provider_new_from_metadata_node(LassoNode *metadata_node)
provider = LASSO_PROVIDER(g_object_new(LASSO_TYPE_PROVIDER, NULL));
provider->metadata = lasso_node_copy(metadata_node);
- return(provider);
+ return provider;
}
LassoProvider*
@@ -702,5 +702,5 @@ lasso_provider_new_metadata_filename(gchar *metadata_filename)
"Failed to build LassoProvider: invalid metadata file.\n");
}
- return(provider);
+ return provider;
}
diff --git a/lasso/Attic/protocols/register_name_identifier_request.c b/lasso/Attic/protocols/register_name_identifier_request.c
index 943580ba..14d1c45f 100644
--- a/lasso/Attic/protocols/register_name_identifier_request.c
+++ b/lasso/Attic/protocols/register_name_identifier_request.c
@@ -152,7 +152,7 @@ lasso_register_name_identifier_request_new(const xmlChar *providerID,
LASSO_LIB_OLD_PROVIDED_NAME_IDENTIFIER(oldidentifier));
lasso_node_destroy(oldidentifier);
- return (request);
+ return request;
}
static LassoNode *
@@ -229,7 +229,7 @@ lasso_register_name_identifier_request_new_from_query(const xmlChar *query)
g_datalist_clear(&gd);
- return(request);
+ return request;
}
static LassoNode *
@@ -254,7 +254,7 @@ lasso_register_name_identifier_request_new_from_soap(const xmlChar *buffer)
class->set_xmlNode(LASSO_NODE(request), xmlNode_request);
lasso_node_destroy(envelope);
- return(request);
+ return request;
}
LassoNode*
@@ -277,5 +277,5 @@ lasso_register_name_identifier_request_new_from_export(gchar *buff
request = NULL;
}
- return(request);
+ return request;
}
diff --git a/lasso/Attic/protocols/register_name_identifier_response.c b/lasso/Attic/protocols/register_name_identifier_response.c
index e417d3ee..ee48a221 100644
--- a/lasso/Attic/protocols/register_name_identifier_response.c
+++ b/lasso/Attic/protocols/register_name_identifier_response.c
@@ -79,7 +79,7 @@ lasso_register_name_identifier_response_new_from_query(gchar *query)
g_datalist_clear(&gd);
- return(response);
+ return response;
}
static LassoNode*
@@ -104,7 +104,7 @@ lasso_register_name_identifier_response_new_from_soap(gchar *buffer)
class->set_xmlNode(LASSO_NODE(response), xmlNode_response);
lasso_node_destroy(envelope);
- return(response);
+ return response;
}
/*****************************************************************************/
@@ -205,7 +205,7 @@ lasso_register_name_identifier_response_new(gchar *providerID,
lasso_node_destroy(ssc);
lasso_node_destroy(ss);
- return (response);
+ return response;
}
LassoNode*
@@ -222,14 +222,14 @@ lasso_register_name_identifier_response_new_from_request_export(gchar
if(request){
message(G_LOG_LEVEL_WARNING, "Error while building RegisterNameIdentifierRequest\n");
- return(NULL);
+ return NULL;
}
response = lasso_register_name_identifier_response_new(providerID,
statusCodeValue,
request);
- return(response);
+ return response;
}
LassoNode*
@@ -249,8 +249,8 @@ lasso_register_name_identifier_response_new_from_export(gchar *buf
break;
default:
message(G_LOG_LEVEL_WARNING, "Invalid export type\n");
- return(NULL);
+ return NULL;
}
- return(response);
+ return response;
}
diff --git a/lasso/Attic/protocols/request.c b/lasso/Attic/protocols/request.c
index da2f4488..54250afa 100644
--- a/lasso/Attic/protocols/request.c
+++ b/lasso/Attic/protocols/request.c
@@ -108,7 +108,7 @@ lasso_request_new(const xmlChar *assertionArtifact)
lasso_samlp_request_set_assertionArtifact(LASSO_SAMLP_REQUEST(request),
assertionArtifact);
- return (request);
+ return request;
}
LassoNode*
@@ -141,5 +141,5 @@ lasso_request_new_from_export(gchar *buffer,
break;
}
- return (request);
+ return request;
}
diff --git a/lasso/Attic/protocols/response.c b/lasso/Attic/protocols/response.c
index 1491c60f..8bc014f0 100644
--- a/lasso/Attic/protocols/response.c
+++ b/lasso/Attic/protocols/response.c
@@ -106,7 +106,7 @@ lasso_response_new()
lasso_node_destroy(status_code);
lasso_node_destroy(status);
- return (response);
+ return response;
}
LassoNode*
@@ -139,5 +139,5 @@ lasso_response_new_from_export(gchar *buffer,
break;
}
- return (response);
+ return response;
}
diff --git a/lasso/id-ff/defederation.c b/lasso/id-ff/defederation.c
index 17cdef56..291be891 100644
--- a/lasso/id-ff/defederation.c
+++ b/lasso/id-ff/defederation.c
@@ -157,7 +157,7 @@ lasso_defederation_build_notification_msg(LassoDefederation *defederation)
xmlFree(query);
}
- return(ret);
+ return ret;
}
/**
@@ -346,7 +346,7 @@ lasso_defederation_init_notification(LassoDefederation *defederation,
xmlFree(format);
lasso_node_destroy(nameIdentifier);
- return(ret);
+ return ret;
}
/**
@@ -422,7 +422,7 @@ lasso_defederation_process_notification_msg(LassoDefederation *defederation,
done:
- return(ret);
+ return ret;
}
/**
@@ -564,7 +564,7 @@ lasso_defederation_validate_notification(LassoDefederation *defederation)
lasso_node_destroy(nameIdentifier);
}
- return(ret);
+ return ret;
}
/*****************************************************************************/
@@ -677,5 +677,5 @@ lasso_defederation_new(LassoServer *server,
"provider_type", provider_type,
NULL);
- return(defederation);
+ return defederation;
}
diff --git a/lasso/id-ff/identity.c b/lasso/id-ff/identity.c
index 4498499c..e638ec3d 100644
--- a/lasso/id-ff/identity.c
+++ b/lasso/id-ff/identity.c
@@ -104,7 +104,7 @@ lasso_identity_add_federation(LassoIdentity *identity,
identity->is_dirty = TRUE;
- return(0);
+ return 0;
}
LassoIdentity*
@@ -114,7 +114,7 @@ lasso_identity_copy(LassoIdentity *identity)
guint i;
if (identity == NULL) {
- return(NULL);
+ return NULL;
}
copy = LASSO_IDENTITY(g_object_new(LASSO_TYPE_IDENTITY, NULL));
@@ -131,7 +131,7 @@ lasso_identity_copy(LassoIdentity *identity)
(gpointer)copy->federations);
copy->is_dirty = identity->is_dirty;
- return(copy);
+ return copy;
}
void
@@ -171,7 +171,7 @@ lasso_identity_dump(LassoIdentity *identity)
lasso_node_destroy(identity_node);
- return(dump);
+ return dump;
}
LassoFederation*
@@ -187,10 +187,10 @@ lasso_identity_get_federation(LassoIdentity *identity,
remote_providerID);
if (federation == NULL) {
debug("No Federation found with remote ProviderID = %s\n", remote_providerID);
- return (NULL);
+ return NULL;
}
- return(lasso_federation_copy(federation));
+ return lasso_federation_copy(federation);
}
gchar*
@@ -201,12 +201,12 @@ lasso_identity_get_next_federation_remote_providerID(LassoIdentity *identity)
g_return_val_if_fail(identity!=NULL, NULL);
if (identity->providerIDs->len == 0) {
- return(NULL);
+ return NULL;
}
remote_providerID = g_strdup(g_ptr_array_index(identity->providerIDs, 0));
- return(remote_providerID);
+ return remote_providerID;
}
gint
@@ -240,7 +240,7 @@ lasso_identity_remove_federation(LassoIdentity *identity,
identity->is_dirty = TRUE;
- return(0);
+ return 0;
}
/*****************************************************************************/
@@ -342,7 +342,7 @@ lasso_identity_new()
identity = LASSO_IDENTITY(g_object_new(LASSO_TYPE_IDENTITY, NULL));
- return(identity);
+ return identity;
}
LassoIdentity*
@@ -370,7 +370,7 @@ lasso_identity_new_from_dump(gchar *dump)
identity_node = lasso_node_new_from_dump(dump);
if (identity_node == NULL) {
message(G_LOG_LEVEL_WARNING, "Can't create a identity from dump\n");
- return (NULL);
+ return NULL;
}
/* federations */
@@ -475,5 +475,5 @@ lasso_identity_new_from_dump(gchar *dump)
lasso_node_destroy(identity_node);
- return (identity);
+ return identity;
}
diff --git a/lasso/id-ff/lecp.c b/lasso/id-ff/lecp.c
index e06845db..bfca74c6 100644
--- a/lasso/id-ff/lecp.c
+++ b/lasso/id-ff/lecp.c
@@ -46,12 +46,12 @@ lasso_lecp_build_authn_request_envelope_msg(LassoLecp *lecp)
NULL);
if (assertionConsumerServiceURL == NULL) {
message(G_LOG_LEVEL_CRITICAL, "AssertionConsumerServiceURL not found\n");
- return(-1);
+ return -1;
}
if (profile->request == NULL) {
message(G_LOG_LEVEL_CRITICAL, "AuthnRequest not found\n");
- return(-1);
+ return -1;
}
lecp->authnRequestEnvelope = lasso_authn_request_envelope_new(LASSO_AUTHN_REQUEST(profile->request),
@@ -59,16 +59,16 @@ lasso_lecp_build_authn_request_envelope_msg(LassoLecp *lecp)
assertionConsumerServiceURL);
if (lecp->authnRequestEnvelope == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Error while building AuthnRequestEnvelope\n");
- return(-1);
+ return -1;
}
profile->msg_body = lasso_node_export(lecp->authnRequestEnvelope);
if (profile->msg_body == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Error while exporting the AuthnRequestEnvelope to POST msg\n");
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
gint
@@ -91,10 +91,10 @@ lasso_lecp_build_authn_request_msg(LassoLecp *lecp,
profile->msg_body = lasso_node_export_to_soap(profile->request);
if (profile->msg_body == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Error while building the AuthnRequest SOAP message\n");
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
gint
@@ -108,15 +108,15 @@ lasso_lecp_build_authn_response_msg(LassoLecp *lecp)
profile->msg_url = g_strdup(lecp->assertionConsumerServiceURL);
if (profile->msg_url == NULL) {
message(G_LOG_LEVEL_CRITICAL, "AssertionConsumerServiceURL not found\n");
- return(-1);
+ return -1;
}
profile->msg_body = lasso_node_export_to_base64(profile->response);
if (profile->msg_body == NULL) {
message(G_LOG_LEVEL_CRITICAL, "AuthnResponse Base64 msg not found\n");
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
gint
@@ -135,7 +135,7 @@ lasso_lecp_build_authn_response_envelope_msg(LassoLecp *lecp,
if (LASSO_IS_AUTHN_RESPONSE(profile->response) == FALSE) {
message(G_LOG_LEVEL_CRITICAL, "AuthnResponse not found\n");
- return(-1);
+ return -1;
}
provider = lasso_server_get_provider_ref(profile->server,
@@ -143,7 +143,7 @@ lasso_lecp_build_authn_response_envelope_msg(LassoLecp *lecp,
NULL);
if (provider == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Provider %s not found\n", profile->remote_providerID);
- return(-1);
+ return -1;
}
/* build lib:AuthnResponse */
@@ -157,7 +157,7 @@ lasso_lecp_build_authn_response_envelope_msg(LassoLecp *lecp,
NULL);
if (assertionConsumerServiceURL == NULL) {
message(G_LOG_LEVEL_CRITICAL, "AssertionConsumerServiceURL not found\n");
- return(-1);
+ return -1;
}
xmlFree(LASSO_PROFILE(lecp)->msg_body);
@@ -170,10 +170,10 @@ lasso_lecp_build_authn_response_envelope_msg(LassoLecp *lecp,
if (LASSO_PROFILE(lecp)->msg_body == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Error while exporting the AuthnResponseEnvelope to SOAP msg\n");
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
gint
@@ -188,7 +188,7 @@ lasso_lecp_init_authn_request(LassoLecp *lecp)
a signature template */
res = lasso_login_init_authn_request(LASSO_LOGIN(lecp), lassoHttpMethodPost);
- return(res);
+ return res;
}
gint
@@ -203,10 +203,10 @@ lasso_lecp_init_from_authn_request_msg(LassoLecp *lecp,
if (authn_request_method != lassoHttpMethodSoap) {
message(G_LOG_LEVEL_CRITICAL, "Invalid authentication request method\n");
- return(-1);
+ return -1;
}
res = lasso_login_init_from_authn_request_msg(LASSO_LOGIN(lecp), authn_request_msg, authn_request_method);
- return(res);
+ return res;
}
gint
@@ -219,16 +219,16 @@ lasso_lecp_process_authn_request_envelope_msg(LassoLecp *lecp,
lecp->authnRequestEnvelope = lasso_authn_request_envelope_new_from_export(request_msg, lassoNodeExportTypeXml);
if (lecp->authnRequestEnvelope == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Error while building the authentication request envelope\n");
- return(-1);
+ return -1;
}
LASSO_PROFILE(lecp)->request = lasso_authn_request_envelope_get_authnRequest(LASSO_AUTHN_REQUEST_ENVELOPE(lecp->authnRequestEnvelope));
if (LASSO_PROFILE(lecp)->request == NULL) {
message(G_LOG_LEVEL_CRITICAL, "AuthnRequest not found\n");
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
gint
@@ -245,23 +245,23 @@ lasso_lecp_process_authn_response_envelope_msg(LassoLecp *lecp,
lecp->authnResponseEnvelope = lasso_authn_response_envelope_new_from_export(response_msg, lassoNodeExportTypeSoap);
if (lecp->authnResponseEnvelope == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Error while building AuthnResponseEnvelope\n");
- return(-1);
+ return -1;
}
profile->response = lasso_authn_response_envelope_get_authnResponse(LASSO_AUTHN_RESPONSE_ENVELOPE(lecp->authnResponseEnvelope));
if (profile->response == NULL) {
message(G_LOG_LEVEL_CRITICAL, "AuthnResponse not found\n");
- return(-1);
+ return -1;
}
lecp->assertionConsumerServiceURL = lasso_authn_response_envelope_get_assertionConsumerServiceURL(
LASSO_AUTHN_RESPONSE_ENVELOPE(lecp->authnResponseEnvelope));
if (lecp->assertionConsumerServiceURL == NULL){
message(G_LOG_LEVEL_CRITICAL, "AssertionConsumerServiceURL not found\n");
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
void
@@ -341,5 +341,5 @@ lasso_lecp_new(LassoServer *server)
}
- return(lecp);
+ return lecp;
}
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c
index 99f957b6..85ceaf8c 100644
--- a/lasso/id-ff/login.c
+++ b/lasso/id-ff/login.c
@@ -83,7 +83,7 @@ lasso_login_add_response_assertion(LassoLogin *login,
message(G_LOG_LEVEL_CRITICAL, err->message);
ret = err->code;
g_error_free(err);
- return(ret);
+ return ret;
}
assertion = lasso_assertion_new(LASSO_PROFILE(login)->server->providerID,
requestID);
@@ -125,7 +125,7 @@ lasso_login_add_response_assertion(LassoLogin *login,
lasso_node_destroy(as);
lasso_node_destroy(assertion);
- return (ret);
+ return ret;
}
static gint
@@ -210,7 +210,7 @@ lasso_login_process_federation(LassoLogin *login)
xmlFree(nameIDPolicy);
xmlFree(consent);
- return (ret);
+ return ret;
}
static gint
@@ -297,7 +297,7 @@ lasso_login_process_response_status_and_assertion(LassoLogin *login) {
lasso_node_destroy(status);
lasso_node_destroy(assertion);
- return (ret);
+ return ret;
}
/*****************************************************************************/
@@ -398,7 +398,7 @@ lasso_login_accept_sso(LassoLogin *login)
lasso_node_destroy(idp_ni_copy);
lasso_node_destroy(assertion);
- return (ret);
+ return ret;
}
/**
@@ -436,13 +436,13 @@ lasso_login_build_artifact_msg(LassoLogin *login,
if (http_method != lassoHttpMethodRedirect && http_method != lassoHttpMethodPost) {
message(G_LOG_LEVEL_CRITICAL, "Invalid HTTP method, it could be REDIRECT or POST\n.");
- return (-2);
+ return -2;
}
/* ProtocolProfile must be BrwsArt */
if (login->protocolProfile != lassoLoginProtocolProfileBrwsArt) {
message(G_LOG_LEVEL_CRITICAL, "Failed to build artifact message, an AuthnResponse is required by ProtocolProfile.\n");
- return (-3);
+ return -3;
}
if (authentication_result == 0) {
@@ -513,7 +513,7 @@ lasso_login_build_artifact_msg(LassoLogin *login,
xmlFree(b64_samlArt);
xmlFree(relayState);
- return (0);
+ return 0;
}
/**
@@ -553,7 +553,7 @@ lasso_login_build_authn_request_msg(LassoLogin *login,
if (remote_provider == NULL) {
ret = err->code;
g_error_free(err);
- return (ret);
+ return ret;
}
/* check if authnRequest must be signed */
@@ -634,7 +634,7 @@ lasso_login_build_authn_request_msg(LassoLogin *login,
xmlFree(url);
xmlFree(request_protocolProfile);
- return (ret);
+ return ret;
}
/**
@@ -664,7 +664,7 @@ lasso_login_build_authn_response_msg(LassoLogin *login,
/* ProtocolProfile must be BrwsPost */
if (login->protocolProfile != lassoLoginProtocolProfileBrwsPost) {
message(G_LOG_LEVEL_CRITICAL, "Failed to build AuthnResponse message, an Artifact is required by ProtocolProfile.\n");
- return (-1);
+ return -1;
}
if (authentication_result == 0) {
@@ -695,7 +695,7 @@ lasso_login_build_authn_response_msg(LassoLogin *login,
lassoProviderTypeSp,
NULL);
- return (0);
+ return 0;
}
gint
@@ -725,13 +725,13 @@ lasso_login_build_request_msg(LassoLogin *login)
if (err != NULL) {
goto done;
}
- return (0);
+ return 0;
done:
message(G_LOG_LEVEL_CRITICAL, err->message);
ret = err->code;
g_error_free(err);
- return (ret);
+ return ret;
}
void
@@ -766,7 +766,7 @@ lasso_login_dump(LassoLogin *login)
dump = lasso_node_export(node);
lasso_node_destroy(node);
- return (dump);
+ return dump;
}
gint
@@ -776,7 +776,7 @@ lasso_login_init_authn_request(LassoLogin *login,
g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
if (http_method != lassoHttpMethodRedirect && http_method != lassoHttpMethodPost) {
message(G_LOG_LEVEL_CRITICAL, "Invalid HTTP method, it must be REDIRECT or POST\n.");
- return (LASSO_PARAM_ERROR_INVALID_VALUE);
+ return LASSO_PARAM_ERROR_INVALID_VALUE;
}
login->http_method = http_method;
@@ -793,12 +793,12 @@ lasso_login_init_authn_request(LassoLogin *login,
}
if (LASSO_PROFILE(login)->request == NULL) {
- return (-2);
+ return -2;
}
LASSO_PROFILE(login)->request_type = lassoMessageTypeAuthnRequest;
- return (0);
+ return 0;
}
gint
@@ -821,7 +821,7 @@ lasso_login_init_from_authn_request_msg(LassoLogin *login,
authn_request_http_method != lassoHttpMethodPost && \
authn_request_http_method != lassoHttpMethodSoap) {
message(G_LOG_LEVEL_CRITICAL, "Invalid HTTP method, it could be REDIRECT, POST or SOAP (LECP)\n.");
- return (-2);
+ return -2;
}
server = LASSO_PROFILE(login)->server;
@@ -849,7 +849,7 @@ lasso_login_init_from_authn_request_msg(LassoLogin *login,
/* verify ASSO_PROFILE(login)-request is an AuthnRequest object */
if ( LASSO_IS_AUTHN_REQUEST(LASSO_PROFILE(login)->request) == FALSE ) {
message(G_LOG_LEVEL_CRITICAL, "Message is not an AuthnRequest\n");
- return(-1);
+ return -1;
}
LASSO_PROFILE(login)->request_type = lassoMessageTypeAuthnRequest;
@@ -901,14 +901,14 @@ lasso_login_init_from_authn_request_msg(LassoLogin *login,
message(G_LOG_LEVEL_CRITICAL, err->message);
ret = err->code;
g_error_free(err);
- return (ret);
+ return ret;
}
}
else {
message(G_LOG_LEVEL_CRITICAL, err->message);
ret = err->code;
g_error_free(err);
- return (ret);
+ return ret;
}
/* verify request signature */
@@ -944,10 +944,10 @@ lasso_login_init_from_authn_request_msg(LassoLogin *login,
lassoLibStatusCodeUnsignedAuthnRequest);
break;
}
- return (-3);
+ return -3;
}
}
- return (0);
+ return 0;
}
gint
@@ -966,7 +966,7 @@ lasso_login_init_request(LassoLogin *login,
if (response_http_method != lassoHttpMethodRedirect && \
response_http_method != lassoHttpMethodPost) {
message(G_LOG_LEVEL_CRITICAL, "Invalid HTTP method, it could be REDIRECT or POST\n.");
- return (-1);
+ return -1;
}
/* rebuild response (artifact) */
@@ -1011,7 +1011,7 @@ lasso_login_init_request(LassoLogin *login,
g_clear_error(&err);
}
- return (ret);
+ return ret;
}
gboolean
@@ -1051,7 +1051,7 @@ lasso_login_must_authenticate(LassoLogin *login)
lassoLibStatusCodeNoPassive);
}
- return (must_authenticate);
+ return must_authenticate;
}
gint
@@ -1085,7 +1085,7 @@ lasso_login_process_authn_response_msg(LassoLogin *login,
ret2 = lasso_login_process_response_status_and_assertion(login);
- return (ret2 == 0 ? ret1 : ret2);
+ return ret2 == 0 ? ret1 : ret2;
}
gint
@@ -1103,7 +1103,7 @@ lasso_login_process_request_msg(LassoLogin *login,
lassoNodeExportTypeSoap);
if (LASSO_PROFILE(login)->request == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Failed to rebuild samlp:Request with request message.\n");
- return (LASSO_ERROR_UNDEFINED);
+ return LASSO_ERROR_UNDEFINED;
}
LASSO_PROFILE(login)->request_type = lassoMessageTypeRequest;
@@ -1117,7 +1117,7 @@ lasso_login_process_request_msg(LassoLogin *login,
g_error_free(err);
}
- return (ret);
+ return ret;
}
gint
@@ -1132,11 +1132,11 @@ lasso_login_process_response_msg(LassoLogin *login,
lassoNodeExportTypeSoap);
if (LASSO_PROFILE(login)->response == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Failed to rebuild samlp:Response with response message.\n");
- return (LASSO_ERROR_UNDEFINED);
+ return LASSO_ERROR_UNDEFINED;
}
LASSO_PROFILE(login)->response_type = lassoMessageTypeResponse;
- return (lasso_login_process_response_status_and_assertion(login));
+ return lasso_login_process_response_status_and_assertion(login);
}
/*****************************************************************************/
@@ -1234,7 +1234,7 @@ lasso_login_new(LassoServer *server)
"server", lasso_server_copy(server),
NULL));
- return (login);
+ return login;
}
LassoLogin*
@@ -1334,5 +1334,5 @@ lasso_login_new_from_dump(LassoServer *server,
lasso_node_destroy(node_dump);
- return (login);
+ return login;
}
diff --git a/lasso/id-ff/logout.c b/lasso/id-ff/logout.c
index d044a04a..293f778a 100644
--- a/lasso/id-ff/logout.c
+++ b/lasso/id-ff/logout.c
@@ -93,7 +93,7 @@ lasso_logout_dump(LassoLogout *logout)
dump = lasso_node_export(node);
lasso_node_destroy(node);
- return(dump);
+ return dump;
}
/**
@@ -209,7 +209,7 @@ lasso_logout_build_request_msg(LassoLogout *logout)
xmlFree(query);
}
- return(ret);
+ return ret;
}
/**
@@ -310,7 +310,7 @@ lasso_logout_build_response_msg(LassoLogout *logout)
xmlFree(query);
}
- return(ret);
+ return ret;
}
/**
@@ -355,7 +355,7 @@ lasso_logout_get_next_providerID(LassoLogout *logout)
provider_id = lasso_session_get_next_providerID(profile->session);
}
- return(provider_id);
+ return provider_id;
}
/**
@@ -541,7 +541,7 @@ lasso_logout_init_request(LassoLogout *logout,
xmlFree(singleLogoutProtocolProfile);
}
- return(ret);
+ return ret;
}
/**
@@ -645,7 +645,7 @@ gint lasso_logout_process_request_msg(LassoLogout *logout,
xmlFree(remote_providerID);
}
- return(ret);
+ return ret;
}
/**
@@ -778,7 +778,7 @@ lasso_logout_process_response_msg(LassoLogout *logout,
done:
- return(ret);
+ return ret;
}
/**
@@ -800,7 +800,7 @@ gint lasso_logout_reset_session_index(LassoLogout *logout)
lasso_session_reset_index_providerID(profile->session);
- return(0);
+ return 0;
}
/**
@@ -994,7 +994,7 @@ lasso_logout_validate_request(LassoLogout *logout)
done:
- return(ret);
+ return ret;
}
/*****************************************************************************/
@@ -1105,7 +1105,7 @@ lasso_logout_new(LassoServer *server,
"provider_type", provider_type,
NULL);
- return(logout);
+ return logout;
}
LassoLogout*
@@ -1194,5 +1194,5 @@ lasso_logout_new_from_dump(LassoServer *server,
/* Initial logout remote provider id */
logout->initial_remote_providerID = lasso_node_get_child_content(node_dump, "InitialRemoteProviderID", lassoLassoHRef, NULL);
- return(logout);
+ return logout;
}
diff --git a/lasso/id-ff/name_identifier_mapping.c b/lasso/id-ff/name_identifier_mapping.c
index e2851d82..b95dcf5a 100644
--- a/lasso/id-ff/name_identifier_mapping.c
+++ b/lasso/id-ff/name_identifier_mapping.c
@@ -36,7 +36,7 @@ lasso_name_identifier_mapping_dump(LassoNameIdentifierMapping *mapping)
g_return_val_if_fail(LASSO_IS_NAME_IDENTIFIER_MAPPING(mapping), NULL);
- return(dump);
+ return dump;
}
gint
@@ -58,7 +58,7 @@ lasso_name_identifier_mapping_build_request_msg(LassoNameIdentifierMapping *mapp
NULL);
if(provider == NULL) {
message(G_LOG_LEVEL_ERROR, "Provider %s not found\n", profile->remote_providerID);
- return(-2);
+ return -2;
}
protocolProfile = lasso_provider_get_nameIdentifierMappingProtocolProfile(provider,
@@ -68,7 +68,7 @@ lasso_name_identifier_mapping_build_request_msg(LassoNameIdentifierMapping *mapp
message(G_LOG_LEVEL_ERROR, err->message);
ret = err->code;
g_error_free(err);
- return (ret);
+ return ret;
}
if(xmlStrEqual(protocolProfile, lassoLibProtocolProfileSloSpSoap) || \
@@ -88,7 +88,7 @@ lasso_name_identifier_mapping_build_request_msg(LassoNameIdentifierMapping *mapp
profile->msg_body = NULL;
}
- return(0);
+ return 0;
}
gint
@@ -109,7 +109,7 @@ lasso_name_identifier_mapping_build_response_msg(LassoNameIdentifierMapping *map
NULL);
if(provider == NULL) {
message(G_LOG_LEVEL_ERROR, "Provider %s not found\n", profile->remote_providerID);
- return(-2);
+ return -2;
}
protocolProfile = lasso_provider_get_nameIdentifierMappingProtocolProfile(provider,
@@ -119,7 +119,7 @@ lasso_name_identifier_mapping_build_response_msg(LassoNameIdentifierMapping *map
message(G_LOG_LEVEL_ERROR, err->message);
ret = err->code;
g_error_free(err);
- return(ret);
+ return ret;
}
if(xmlStrEqual(protocolProfile, lassoLibProtocolProfileSloSpSoap) || \
@@ -138,7 +138,7 @@ lasso_name_identifier_mapping_build_response_msg(LassoNameIdentifierMapping *map
profile->msg_body = NULL;
}
- return(0);
+ return 0;
}
gint
@@ -162,7 +162,7 @@ lasso_name_identifier_mapping_init_request(LassoNameIdentifierMapping *mapping,
federation = lasso_identity_get_federation(profile->identity, profile->remote_providerID);
if(federation == NULL) {
message(G_LOG_LEVEL_ERROR, "error, federation not found\n");
- return(-3);
+ return -3;
}
/* get the name identifier (!!! depend on the provider type : SP or IDP !!!)*/
@@ -183,13 +183,13 @@ lasso_name_identifier_mapping_init_request(LassoNameIdentifierMapping *mapping,
break;
default:
message(G_LOG_LEVEL_ERROR, "Unknown provider type\n");
- return(-4);
+ return -4;
}
lasso_federation_destroy(federation);
if(nameIdentifier == NULL) {
message(G_LOG_LEVEL_ERROR, "Name identifier not found\n");
- return(-5);
+ return -5;
}
/* build the request */
@@ -203,7 +203,7 @@ lasso_name_identifier_mapping_init_request(LassoNameIdentifierMapping *mapping,
g_return_val_if_fail(profile->request != NULL, -6);
- return(0);
+ return 0;
}
gint
@@ -237,7 +237,7 @@ lasso_name_identifier_mapping_process_request_msg(LassoNameIdentifierMapping *ma
break;
default:
message(G_LOG_LEVEL_ERROR, "Unknown request method\n");
- return(-3);
+ return -3;
}
/* set the remote provider id from the request */
@@ -258,7 +258,7 @@ lasso_name_identifier_mapping_process_request_msg(LassoNameIdentifierMapping *ma
nameIdentifier = lasso_node_get_child(profile->request, "NameIdentifier", NULL, NULL);
if(nameIdentifier == NULL) {
statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist);
- return(-5);
+ return -5;
}
remote_providerID = lasso_node_get_child_content(profile->request, "ProviderID",
@@ -269,17 +269,17 @@ lasso_name_identifier_mapping_process_request_msg(LassoNameIdentifierMapping *ma
if(federation == NULL) {
message(G_LOG_LEVEL_WARNING, "No federation for %s\n", remote_providerID);
statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist);
- return(-6);
+ return -6;
}
if(lasso_federation_verify_nameIdentifier(federation, nameIdentifier) == FALSE){
message(G_LOG_LEVEL_WARNING, "No name identifier for %s\n", remote_providerID);
statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist);
- return(-7);
+ return -7;
}
lasso_federation_destroy(federation);
- return(0);
+ return 0;
}
gint
@@ -304,23 +304,23 @@ lasso_name_identifier_mapping_process_response_msg(LassoNameIdentifierMapping *m
profile->response = lasso_name_identifier_mapping_response_new_from_soap(response_msg);
default:
message(G_LOG_LEVEL_ERROR, "Unknown response method\n");
- return(-3);
+ return -3;
}
statusCode = lasso_node_get_child(profile->response, "StatusCode", NULL, NULL);
statusCodeValue = lasso_node_get_attr_value(statusCode, "Value", &err);
if (err == NULL) {
if(!xmlStrEqual(statusCodeValue, lassoSamlStatusCodeSuccess)) {
- return(-4);
+ return -4;
}
}
else {
message(G_LOG_LEVEL_ERROR, err->message);
ret = err->code;
g_error_free(err);
- return (ret);
+ return ret;
}
- return(0);
+ return 0;
}
/*****************************************************************************/
@@ -376,5 +376,5 @@ lasso_name_identifier_mapping_new(LassoServer *server,
"identity", lasso_identity_copy(identity),
"provider_type", provider_type,
NULL);
- return(mapping);
+ return mapping;
}
diff --git a/lasso/id-ff/name_registration.c b/lasso/id-ff/name_registration.c
index af49eaf4..79a56cc3 100644
--- a/lasso/id-ff/name_registration.c
+++ b/lasso/id-ff/name_registration.c
@@ -48,7 +48,7 @@ lasso_name_registration_dump(LassoNameRegistration *name_registration)
dump = NULL;
- return(dump);
+ return dump;
}
/**
@@ -140,7 +140,7 @@ lasso_name_registration_build_request_msg(LassoNameRegistration *name_registrati
done:
- return(ret);
+ return ret;
}
gint
@@ -159,7 +159,7 @@ lasso_name_registration_build_response_msg(LassoNameRegistration *name_registrat
NULL);
if (provider == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Provider not found (ProviderID = %s)\n", profile->remote_providerID);
- return(-2);
+ return -2;
}
protocolProfile = lasso_provider_get_registerNameIdentifierProtocolProfile(provider,
@@ -167,7 +167,7 @@ lasso_name_registration_build_response_msg(LassoNameRegistration *name_registrat
NULL);
if (protocolProfile == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Register name identifier protocol profile not found\n");
- return(-3);
+ return -3;
}
if (xmlStrEqual(protocolProfile, lassoLibProtocolProfileSloSpSoap) || \
@@ -183,7 +183,7 @@ lasso_name_registration_build_response_msg(LassoNameRegistration *name_registrat
debug("building a http get response message\n");
}
- return(0);
+ return 0;
}
void
@@ -321,7 +321,7 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration,
done:
- return(ret);
+ return ret;
}
gint lasso_name_registration_process_request_msg(LassoNameRegistration *name_registration,
@@ -369,7 +369,7 @@ gint lasso_name_registration_process_request_msg(LassoNameRegistration *name_reg
done :
- return(ret);
+ return ret;
}
gint
@@ -445,7 +445,7 @@ lasso_name_registration_validate_request(LassoNameRegistration *name_registratio
done:
- return(ret);
+ return ret;
}
gint
@@ -497,7 +497,7 @@ lasso_name_registration_process_response_msg(LassoNameRegistration *name_registr
done:
- return(ret);
+ return ret;
}
/*****************************************************************************/
@@ -568,5 +568,5 @@ lasso_name_registration_new(LassoServer *server,
"provider_type", provider_type,
NULL);
- return(name_registration);
+ return name_registration;
}
diff --git a/lasso/id-ff/profile.c b/lasso/id-ff/profile.c
index f6d255ef..57e22c85 100644
--- a/lasso/id-ff/profile.c
+++ b/lasso/id-ff/profile.c
@@ -54,13 +54,13 @@ lasso_profile_get_request_type_from_soap_msg(gchar *soap)
soap_node = lasso_node_new_from_dump(soap);
if (soap_node == NULL) {
message(G_LOG_LEVEL_WARNING, "Error while build node from soap msg\n");
- return(-1);
+ return -1;
}
body_node = lasso_node_get_child(soap_node, "Body", NULL, NULL);
if(body_node == NULL) {
message(G_LOG_LEVEL_WARNING, "Body node not found\n");
- return(-2);
+ return -2;
}
children = lasso_node_get_children(body_node);
@@ -92,7 +92,7 @@ lasso_profile_get_request_type_from_soap_msg(gchar *soap)
xmlFree(name);
}
- return(type);
+ return type;
}
@@ -165,7 +165,7 @@ lasso_profile_dump(LassoProfile *ctx,
dump = lasso_node_export(node);
lasso_node_destroy(node);
- return (dump);
+ return dump;
}
LassoIdentity*
@@ -176,11 +176,11 @@ lasso_profile_get_identity(LassoProfile *ctx)
if (ctx->identity != NULL) {
/* return identity copy only if identity isn't empty */
if (ctx->identity->providerIDs->len > 0) {
- return (lasso_identity_copy(ctx->identity));
+ return lasso_identity_copy(ctx->identity);
}
}
- return (NULL);
+ return NULL;
}
LassoSession*
@@ -191,21 +191,21 @@ lasso_profile_get_session(LassoProfile *ctx)
if (ctx->session != NULL) {
/* return session copy only if session isn't empty */
if (ctx->session->providerIDs->len > 0) {
- return (lasso_session_copy(ctx->session));
+ return lasso_session_copy(ctx->session);
}
}
- return (NULL);
+ return NULL;
}
gboolean
lasso_profile_is_identity_dirty(LassoProfile *ctx)
{
if (ctx->identity != NULL) {
- return (ctx->identity->is_dirty);
+ return ctx->identity->is_dirty;
}
else {
- return (FALSE);
+ return FALSE;
}
}
@@ -213,10 +213,10 @@ gboolean
lasso_profile_is_session_dirty(LassoProfile *ctx)
{
if (ctx->session != NULL) {
- return (ctx->session->is_dirty);
+ return ctx->session->is_dirty;
}
else {
- return (FALSE);
+ return FALSE;
}
}
@@ -227,7 +227,7 @@ lasso_profile_set_remote_providerID(LassoProfile *ctx,
g_free(ctx->remote_providerID);
ctx->remote_providerID = g_strdup(providerID);
- return (1);
+ return 1;
}
void
@@ -260,7 +260,7 @@ lasso_profile_set_identity(LassoProfile *ctx,
ctx->identity = lasso_identity_copy(identity);
ctx->identity->is_dirty = FALSE;
- return(0);
+ return 0;
}
gint
@@ -270,11 +270,11 @@ lasso_profile_set_identity_from_dump(LassoProfile *ctx,
ctx->identity = lasso_identity_new_from_dump((gchar *)dump);
if (ctx->identity == NULL) {
message(G_LOG_LEVEL_WARNING, "Failed to create the identity from the identity dump\n");
- return(-1);
+ return -1;
}
ctx->identity->is_dirty = FALSE;
- return(0);
+ return 0;
}
gint
@@ -286,7 +286,7 @@ lasso_profile_set_session(LassoProfile *ctx,
ctx->session = lasso_session_copy(session);
ctx->session->is_dirty = FALSE;
- return(0);
+ return 0;
}
gint
@@ -296,11 +296,11 @@ lasso_profile_set_session_from_dump(LassoProfile *ctx,
ctx->session = lasso_session_new_from_dump((gchar *)dump);
if (ctx->session == NULL) {
message(G_LOG_LEVEL_WARNING, "Failed to create the session from the session dump\n");
- return(-1);
+ return -1;
}
ctx->session->is_dirty = FALSE;
- return(0);
+ return 0;
}
/*****************************************************************************/
@@ -519,5 +519,5 @@ lasso_profile_new(LassoServer *server,
"session", lasso_session_copy(session),
NULL));
- return (ctx);
+ return ctx;
}
diff --git a/lasso/id-ff/server.c b/lasso/id-ff/server.c
index 91b69880..8acfb129 100644
--- a/lasso/id-ff/server.c
+++ b/lasso/id-ff/server.c
@@ -58,7 +58,7 @@ lasso_server_add_lasso_provider(LassoServer *server,
g_ptr_array_add(server->providers, provider);
- return (0);
+ return 0;
}
/*****************************************************************************/
@@ -82,10 +82,10 @@ lasso_server_add_provider(LassoServer *server,
}
else {
message(G_LOG_LEVEL_CRITICAL, "Failed to add new provider.\n");
- return (LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED);
+ return LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED;
}
- return (0);
+ return 0;
}
LassoServer*
@@ -114,7 +114,7 @@ lasso_server_copy(LassoServer *server)
copy->certificate = g_strdup(server->certificate);
copy->signature_method = server->signature_method;
- return(copy);
+ return copy;
}
void
@@ -196,7 +196,7 @@ lasso_server_dump(LassoServer *server)
dump = lasso_node_export(server_node);
lasso_node_destroy(server_node);
- return(dump);
+ return dump;
}
LassoProvider*
@@ -217,13 +217,13 @@ lasso_server_get_provider(LassoServer *server,
provider = lasso_server_get_provider_ref(server, providerID, &tmp_err);
if (provider != NULL) {
- return (lasso_provider_copy(provider));
+ return lasso_provider_copy(provider);
}
else {
g_propagate_error (err, tmp_err);
}
- return (NULL);
+ return NULL;
}
LassoProvider*
@@ -276,7 +276,7 @@ lasso_server_get_provider_ref(LassoServer *server,
/* print error msg here so that caller just check err->code */
message(G_LOG_LEVEL_CRITICAL, err[0]->message);
- return(NULL);
+ return NULL;
}
gchar *
@@ -313,7 +313,7 @@ lasso_server_get_providerID_from_hash(LassoServer *server,
message(G_LOG_LEVEL_CRITICAL,
"Failed to get a providerID corresponding to the hash.\n")
- return(NULL);
+ return NULL;
}
/*****************************************************************************/
@@ -435,7 +435,7 @@ lasso_server_new(gchar *metadata,
message(G_LOG_LEVEL_WARNING, err->message);
g_error_free(err);
lasso_node_destroy(md_node);
- return (NULL);
+ return NULL;
}
}
@@ -455,7 +455,7 @@ lasso_server_new(gchar *metadata,
LASSO_PROVIDER(server)->public_key = g_strdup(public_key);
LASSO_PROVIDER(server)->ca_certificate = NULL;
- return(server);
+ return server;
}
LassoServer *
@@ -473,13 +473,13 @@ lasso_server_new_from_dump(gchar *dump)
server_node = lasso_node_new_from_dump(dump);
if (server_node == NULL) {
message(G_LOG_LEVEL_WARNING, "Error while loading server dump\n");
- return(NULL);
+ return NULL;
}
server_class = LASSO_NODE_GET_CLASS(server_node);
if (strcmp(server_class->get_name(server_node), LASSO_SERVER_NODE) != 0) {
message(G_LOG_LEVEL_WARNING, "XML is not a server dump\n");
lasso_node_destroy(server_node);
- return(NULL);
+ return NULL;
}
/* providerID */
@@ -558,5 +558,5 @@ lasso_server_new_from_dump(gchar *dump)
lasso_node_destroy(server_node);
- return(server);
+ return server;
}
diff --git a/lasso/id-ff/session.c b/lasso/id-ff/session.c
index a86e8324..80c05441 100644
--- a/lasso/id-ff/session.c
+++ b/lasso/id-ff/session.c
@@ -118,7 +118,7 @@ lasso_session_add_assertion(LassoSession *session,
session->is_dirty = TRUE;
- return(0);
+ return 0;
}
LassoSession*
@@ -128,7 +128,7 @@ lasso_session_copy(LassoSession *session)
guint i;
if (session == NULL) {
- return(NULL);
+ return NULL;
}
copy = LASSO_SESSION(g_object_new(LASSO_TYPE_SESSION, NULL));
@@ -145,7 +145,7 @@ lasso_session_copy(LassoSession *session)
(gpointer)copy->assertions);
copy->is_dirty = session->is_dirty;
- return(copy);
+ return copy;
}
void
@@ -187,7 +187,7 @@ lasso_session_dump(LassoSession *session)
lasso_node_destroy(session_node);
- return(dump);
+ return dump;
}
LassoNode*
@@ -205,7 +205,7 @@ lasso_session_get_assertion(LassoSession *session,
return NULL;
}
- return(lasso_node_copy(assertion));
+ return lasso_node_copy(assertion);
}
gchar*
@@ -235,7 +235,7 @@ lasso_session_get_authentication_method(LassoSession *session,
done:
lasso_node_destroy(as);
lasso_node_destroy(assertion);
- return (authentication_method);
+ return authentication_method;
}
gchar*
@@ -246,15 +246,15 @@ lasso_session_get_first_providerID(LassoSession *session)
g_return_val_if_fail(session != NULL, NULL);
if(session->providerIDs->len == 0) {
- return(NULL);
+ return NULL;
}
providerID = g_ptr_array_index(session->providerIDs, 0);
if (providerID == NULL) {
- return(NULL);
+ return NULL;
}
- return(g_strdup(providerID));
+ return g_strdup(providerID);
}
gchar*
@@ -265,15 +265,15 @@ lasso_session_get_next_providerID(LassoSession *session)
g_return_val_if_fail(session!=NULL, NULL);
if(session->providerIDs->len == 0) {
- return(NULL);
+ return NULL;
}
if (session->index_providerID < 0) {
- return(NULL);
+ return NULL;
}
if (session->index_providerID>=session->providerIDs->len) {
- return (NULL);
+ return NULL;
}
/* get the next provider id and increments the index */
@@ -282,7 +282,7 @@ lasso_session_get_next_providerID(LassoSession *session)
session->index_providerID++;
//printf("return provider id %s\n", providerID);
- return(providerID);
+ return providerID;
}
gint
@@ -317,7 +317,7 @@ lasso_session_remove_assertion(LassoSession *session,
session->is_dirty = TRUE;
- return(0);
+ return 0;
}
gint
@@ -329,7 +329,7 @@ lasso_session_reset_index_providerID(LassoSession *session)
session->index_providerID = 0;
}
- return(0);
+ return 0;
}
/*****************************************************************************/
@@ -432,7 +432,7 @@ lasso_session_new()
session = LASSO_SESSION(g_object_new(LASSO_TYPE_SESSION, NULL));
- return(session);
+ return session;
}
LassoSession*
@@ -453,7 +453,7 @@ lasso_session_new_from_dump(gchar *dump)
session_node = lasso_node_new_from_dump(dump);
if (session_node == NULL) {
message(G_LOG_LEVEL_WARNING, "Can't create a session from dump\n");
- return (NULL);
+ return NULL;
}
/* get assertions */
@@ -500,5 +500,5 @@ lasso_session_new_from_dump(gchar *dump)
lasso_node_destroy(assertions_node);
lasso_node_destroy(session_node);
- return (session);
+ return session;
}
diff --git a/lasso/lasso.c b/lasso/lasso.c
index 5517ddcb..7fb3090e 100644
--- a/lasso/lasso.c
+++ b/lasso/lasso.c
@@ -78,13 +78,13 @@ int lasso_init()
/* Init xmlsec library */
if(xmlSecInit() < 0) {
message(G_LOG_LEVEL_CRITICAL, "XMLSec initialization failed.\n");
- return(-1);
+ return -1;
}
/* Check loaded library version */
if(xmlSecCheckVersion() != 1) {
message(G_LOG_LEVEL_CRITICAL, "Loaded xmlsec library version is not compatible.\n");
- return(-1);
+ return -1;
}
/* Load default crypto engine if we are supporting dynamic
@@ -104,13 +104,13 @@ int lasso_init()
/* Init crypto library */
if(xmlSecCryptoAppInit(NULL) < 0) {
message(G_LOG_LEVEL_CRITICAL, "Crypto initialization failed.\n");
- return(-1);
+ return -1;
}
/* Init xmlsec-crypto library */
if(xmlSecCryptoInit() < 0) {
message(G_LOG_LEVEL_CRITICAL, "xmlsec-crypto initialization failed.\n");
- return(-1);
+ return -1;
}
return 0;
}
@@ -141,7 +141,7 @@ int lasso_shutdown()
xmlCleanupParser();
/* this is to debug memory for regression tests */
xmlMemoryDump();
- return (0);
+ return 0;
}
/**
@@ -163,7 +163,7 @@ lasso_check_version_ext(int major, int minor, int subminor, lassoCheckVersionMod
if (major != LASSO_VERSION_MAJOR) {
g_message("expected major version=%d;real major version=%d",
LASSO_VERSION_MAJOR, major);
- return (0);
+ return 0;
}
switch (mode) {
@@ -172,7 +172,7 @@ lasso_check_version_ext(int major, int minor, int subminor, lassoCheckVersionMod
g_message("mode=exact;expected minor version=%d;real minor version=%d;expected subminor version=%d;real subminor version=%d",
LASSO_VERSION_MINOR, minor,
LASSO_VERSION_SUBMINOR, subminor);
- return (0);
+ return 0;
}
break;
case lassoCheckVersionABICompatible:
@@ -181,10 +181,10 @@ lasso_check_version_ext(int major, int minor, int subminor, lassoCheckVersionMod
g_message("mode=abi compatible;expected minor version=%d;real minor version=%d;expected subminor version=%d;real subminor version=%d",
LASSO_VERSION_MINOR, minor,
LASSO_VERSION_SUBMINOR, subminor);
- return (0);
+ return 0;
}
break;
}
- return (1);
+ return 1;
}
diff --git a/lasso/xml/errors.c b/lasso/xml/errors.c
index c61c49db..a3ee1ce0 100644
--- a/lasso/xml/errors.c
+++ b/lasso/xml/errors.c
@@ -83,6 +83,6 @@ lasso_strerror(int error_code)
default:
sprintf(msg, "Undefined error code %d.", error_code);
- return(strdup(msg));
+ return strdup(msg);
}
}
diff --git a/lasso/xml/lib_assertion.c b/lasso/xml/lib_assertion.c
index cdda46b0..3d015350 100644
--- a/lasso/xml/lib_assertion.c
+++ b/lasso/xml/lib_assertion.c
@@ -164,5 +164,5 @@ lasso_lib_assertion_new(gboolean use_xsitype)
"use_xsitype", use_xsitype,
NULL));
- return (node);
+ return node;
}
diff --git a/lasso/xml/lib_authentication_statement.c b/lasso/xml/lib_authentication_statement.c
index 6e9d94ff..51012afe 100644
--- a/lasso/xml/lib_authentication_statement.c
+++ b/lasso/xml/lib_authentication_statement.c
@@ -183,5 +183,5 @@ lasso_lib_authentication_statement_new(gboolean use_xsitype)
"use_xsitype", use_xsitype,
NULL));
- return (node);
+ return node;
}
diff --git a/lasso/xml/lib_idp_provided_name_identifier.c b/lasso/xml/lib_idp_provided_name_identifier.c
index 379f0cd7..59686df7 100644
--- a/lasso/xml/lib_idp_provided_name_identifier.c
+++ b/lasso/xml/lib_idp_provided_name_identifier.c
@@ -83,5 +83,5 @@ lasso_lib_idp_provided_name_identifier_new(const xmlChar *content)
NULL));
xmlNodeSetContent(LASSO_NODE_GET_CLASS(node)->get_xmlNode(node),
content);
- return (node);
+ return node;
}
diff --git a/lasso/xml/lib_old_provided_name_identifier.c b/lasso/xml/lib_old_provided_name_identifier.c
index b4f6deca..dfb5f070 100644
--- a/lasso/xml/lib_old_provided_name_identifier.c
+++ b/lasso/xml/lib_old_provided_name_identifier.c
@@ -84,5 +84,5 @@ LassoNode* lasso_lib_old_provided_name_identifier_new(const xmlChar *content) {
xmlNodeSetContent(LASSO_NODE_GET_CLASS(node)->get_xmlNode(node),
content);
- return(node);
+ return node;
}
diff --git a/lasso/xml/lib_sp_provided_name_identifier.c b/lasso/xml/lib_sp_provided_name_identifier.c
index ee0cef4e..18be5d17 100644
--- a/lasso/xml/lib_sp_provided_name_identifier.c
+++ b/lasso/xml/lib_sp_provided_name_identifier.c
@@ -84,5 +84,5 @@ LassoNode* lasso_lib_sp_provided_name_identifier_new(const xmlChar *content) {
xmlNodeSetContent(LASSO_NODE_GET_CLASS(node)->get_xmlNode(node),
content);
- return(node);
+ return node;
}
diff --git a/lasso/xml/lib_subject.c b/lasso/xml/lib_subject.c
index fdfbe151..ca73b12e 100644
--- a/lasso/xml/lib_subject.c
+++ b/lasso/xml/lib_subject.c
@@ -154,5 +154,5 @@ lasso_lib_subject_new(gboolean use_xsitype)
"use_xsitype", use_xsitype,
NULL));
- return (node);
+ return node;
}
diff --git a/lasso/xml/saml_assertion.c b/lasso/xml/saml_assertion.c
index 0db42e42..06ff7f1c 100644
--- a/lasso/xml/saml_assertion.c
+++ b/lasso/xml/saml_assertion.c
@@ -273,7 +273,7 @@ lasso_saml_assertion_set_signature(LassoSamlAssertion *node,
ret = class->add_signature(LASSO_NODE (node), sign_method,
private_key_file, certificate_file);
- return (ret);
+ return ret;
}
/*****************************************************************************/
diff --git a/lasso/xml/saml_condition_abstract.c b/lasso/xml/saml_condition_abstract.c
index c22d1b92..ea383878 100644
--- a/lasso/xml/saml_condition_abstract.c
+++ b/lasso/xml/saml_condition_abstract.c
@@ -92,5 +92,5 @@ LassoNode* lasso_saml_condition_abstract_new(const xmlChar *name)
if (name && *name)
LASSO_NODE_GET_CLASS(node)->set_name(node, name);
- return (node);
+ return node;
}
diff --git a/lasso/xml/saml_name_identifier.c b/lasso/xml/saml_name_identifier.c
index 73c8da58..620a6da4 100644
--- a/lasso/xml/saml_name_identifier.c
+++ b/lasso/xml/saml_name_identifier.c
@@ -126,5 +126,5 @@ LassoNode* lasso_saml_name_identifier_new(const xmlChar *content)
node = LASSO_NODE(g_object_new(LASSO_TYPE_SAML_NAME_IDENTIFIER, NULL));
xmlNodeSetContent(LASSO_NODE_GET_CLASS(node)->get_xmlNode(node),
content);
- return (node);
+ return node;
}
diff --git a/lasso/xml/saml_statement_abstract.c b/lasso/xml/saml_statement_abstract.c
index 84fc2cb4..bac5c444 100644
--- a/lasso/xml/saml_statement_abstract.c
+++ b/lasso/xml/saml_statement_abstract.c
@@ -92,5 +92,5 @@ LassoNode* lasso_saml_statement_abstract_new(const xmlChar *name)
if (name && *name)
LASSO_NODE_GET_CLASS(node)->set_name(node, name);
- return (node);
+ return node;
}
diff --git a/lasso/xml/saml_subject_statement_abstract.c b/lasso/xml/saml_subject_statement_abstract.c
index f7879012..3dd0c44b 100644
--- a/lasso/xml/saml_subject_statement_abstract.c
+++ b/lasso/xml/saml_subject_statement_abstract.c
@@ -115,5 +115,5 @@ LassoNode* lasso_saml_subject_statement_abstract_new(const xmlChar *name)
if (name && *name)
LASSO_NODE_GET_CLASS(node)->set_name(node, name);
- return (node);
+ return node;
}
diff --git a/lasso/xml/samlp_request_abstract.c b/lasso/xml/samlp_request_abstract.c
index 334dcd82..0d663ee5 100644
--- a/lasso/xml/samlp_request_abstract.c
+++ b/lasso/xml/samlp_request_abstract.c
@@ -139,7 +139,7 @@ lasso_samlp_request_abstract_set_signature(LassoSamlpRequestAbstract *node,
ret = class->add_signature(LASSO_NODE (node), sign_method,
private_key_file, certificate_file);
- return (ret);
+ return ret;
}
gint
@@ -155,7 +155,7 @@ lasso_samlp_request_abstract_set_signature_tmpl(LassoSamlpRequestAbstract *node,
class = LASSO_NODE_GET_CLASS(node);
- return(class->add_signature_tmpl(LASSO_NODE (node), sign_type, sign_method, reference_id));
+ return class->add_signature_tmpl(LASSO_NODE (node), sign_type, sign_method, reference_id);
}
gint
diff --git a/lasso/xml/samlp_response_abstract.c b/lasso/xml/samlp_response_abstract.c
index c5a2ca3f..a0f11d7e 100644
--- a/lasso/xml/samlp_response_abstract.c
+++ b/lasso/xml/samlp_response_abstract.c
@@ -152,7 +152,7 @@ lasso_samlp_response_abstract_set_signature(LassoSamlpResponseAbstract *node,
ret = class->add_signature(LASSO_NODE (node), sign_method,
private_key_file, certificate_file);
- return (ret);
+ return ret;
}
gint
@@ -167,7 +167,7 @@ lasso_samlp_response_abstract_set_signature_tmpl(LassoSamlpResponseAbstract *nod
class = LASSO_NODE_GET_CLASS(node);
- return(class->add_signature_tmpl(LASSO_NODE (node), sign_type, sign_method, NULL));
+ return class->add_signature_tmpl(LASSO_NODE (node), sign_type, sign_method, NULL);
}
gint
diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c
index 4f630aff..2f7865dc 100644
--- a/lasso/xml/tools.c
+++ b/lasso/xml/tools.c
@@ -56,7 +56,7 @@ lasso_build_random_sequence(guint8 size)
}
seq[size] = '\0';
- return (seq);
+ return seq;
}
/**
@@ -101,7 +101,7 @@ lasso_build_unique_id(guint8 size)
/* g_free(id); */
/* return (enc_id); */
- return (id);
+ return id;
}
/**
@@ -123,9 +123,9 @@ lasso_doc_get_node_content(xmlDocPtr doc, const xmlChar *name)
node = xmlSecFindNode(xmlDocGetRootElement(doc), name, xmlSecDSigNs);
if (node != NULL)
/* val returned must be xmlFree() */
- return (xmlNodeGetContent(node));
+ return xmlNodeGetContent(node);
else
- return (NULL);
+ return NULL;
}
/**
@@ -141,10 +141,10 @@ xmlChar*
lasso_g_ptr_array_index(GPtrArray *a, guint i)
{
if (a != NULL) {
- return (g_ptr_array_index(a, i));
+ return g_ptr_array_index(a, i);
}
else {
- return (NULL);
+ return NULL;
}
}
@@ -166,7 +166,7 @@ lasso_get_current_time()
tm = localtime(&(time_val.tv_sec));
strftime((char *)ret, 21, "%Y-%m-%dT%H:%M:%SZ", tm);
- return (ret);
+ return ret;
}
/**
@@ -195,7 +195,7 @@ lasso_query_get_value(const gchar *query,
g_ptr_array_add(array, g_strdup(g_ptr_array_index(tmp_array, i)));
}
g_datalist_clear(&gd);
- return (array);
+ return array;
}
static void
@@ -272,7 +272,7 @@ lasso_query_to_dict(const gchar *query)
}
g_strfreev(sa1);
- return (gd);
+ return gd;
}
/**
@@ -307,7 +307,7 @@ lasso_query_verify_signature(const gchar *query,
/* split query, signature (must be last param) */
str_split = g_strsplit(query, "&Signature=", 0);
if (str_split[1] == NULL)
- return (2);
+ return 2;
/* re-create doc to verify (signed + enrypted) */
doc = lasso_str_sign(str_split[0],
lassoSignatureMethodRsaSha1,
@@ -368,7 +368,7 @@ lasso_query_verify_signature(const gchar *query,
if(doc != NULL) {
xmlFreeDoc(doc);
}
- return (ret);
+ return ret;
}
/**
@@ -386,10 +386,10 @@ lasso_sha1(xmlChar *str)
if (str != NULL) {
md = xmlMalloc(20);
- return(SHA1(str, strlen(str), md));
+ return SHA1(str, strlen(str), md);
}
- return (NULL);
+ return NULL;
}
/**
@@ -404,7 +404,7 @@ xmlChar *
lasso_str_escape(xmlChar *str)
{
/* value returned must be xmlFree() */
- return (xmlURIEscapeStr((const xmlChar *)str, NULL));
+ return xmlURIEscapeStr((const xmlChar *)str, NULL);
}
xmlChar *
@@ -427,7 +427,7 @@ lasso_str_hash(xmlChar *str,
xmlFree(b64_digest);
xmlFreeDoc(doc);
/* value returned must be xmlFree() */
- return (digest);
+ return digest;
}
/**
@@ -536,7 +536,7 @@ lasso_str_sign(xmlChar *str,
/* xmlDocDump(stdout, doc); */
xmlSecDSigCtxDestroy(dsigCtx);
/* doc must be freed be caller */
- return (doc);
+ return doc;
done:
/* cleanup */
@@ -547,7 +547,7 @@ lasso_str_sign(xmlChar *str,
if (doc != NULL) {
xmlFreeDoc(doc);
}
- return (NULL);
+ return NULL;
}
/**
@@ -565,5 +565,5 @@ lasso_str_unescape(xmlChar *str)
ret = g_malloc(strlen(str) * 2); /* XXX why *2? strlen(str) should be enough */
xmlURIUnescapeString((const char *)str, 0, ret);
- return (ret);
+ return ret;
}
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c
index 7b98a41d..e7cbb54d 100644
--- a/lasso/xml/xml.c
+++ b/lasso/xml/xml.c
@@ -67,7 +67,7 @@ lasso_node_copy(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->copy(node));
+ return class->copy(node);
}
/**
@@ -89,7 +89,7 @@ lasso_node_dump(LassoNode *node,
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->dump(node, encoding, format));
+ return class->dump(node, encoding, format);
}
/**
@@ -122,7 +122,7 @@ lasso_node_export(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->export(node));
+ return class->export(node);
}
/**
@@ -140,7 +140,7 @@ lasso_node_export_to_base64(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->export_to_base64(node));
+ return class->export_to_base64(node);
}
/**
@@ -163,7 +163,7 @@ lasso_node_export_to_query(LassoNode *node,
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->export_to_query(node, sign_method, private_key_file));
+ return class->export_to_query(node, sign_method, private_key_file);
}
/**
@@ -181,7 +181,7 @@ lasso_node_export_to_soap(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->export_to_soap(node));
+ return class->export_to_soap(node);
}
/**
@@ -215,7 +215,7 @@ lasso_node_get_attr(LassoNode *node,
/* don't check @name here, it's checked in impl method */
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_attr(node, name, err));
+ return class->get_attr(node, name, err);
}
/**
@@ -250,7 +250,7 @@ lasso_node_get_attr_value(LassoNode *node,
/* don't check @name here, it's checked in impl method */
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_attr_value(node, name, err));
+ return class->get_attr_value(node, name, err);
}
/**
@@ -268,7 +268,7 @@ lasso_node_get_attrs(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_attrs(node));
+ return class->get_attrs(node);
}
/**
@@ -304,7 +304,7 @@ lasso_node_get_child(LassoNode *node,
/* don't check @name here, it's checked in impl method */
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_child(node, name, href, err));
+ return class->get_child(node, name, href, err);
}
/**
@@ -341,7 +341,7 @@ lasso_node_get_child_content(LassoNode *node,
/* don't check @name here, it's checked in impl method */
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_child_content(node, name, href, err));
+ return class->get_child_content(node, name, href, err);
}
/**
@@ -359,7 +359,7 @@ lasso_node_get_children(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_children(node));
+ return class->get_children(node);
}
/**
@@ -394,7 +394,7 @@ lasso_node_get_content(LassoNode *node,
}
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_content(node, err));
+ return class->get_content(node, err);
}
/**
@@ -412,7 +412,7 @@ lasso_node_get_name(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_name(node));
+ return class->get_name(node);
}
/**
@@ -492,7 +492,7 @@ lasso_node_verify_signature(LassoNode *node,
/* don't check @public_key_file here, it's checked in impl method */
class = LASSO_NODE_GET_CLASS(node);
- return (class->verify_signature(node, public_key_file));
+ return class->verify_signature(node, public_key_file);
}
/**
@@ -516,7 +516,7 @@ lasso_node_verify_x509_signature(LassoNode *node,
/* don't check @certificate_file here, it's checked in impl method */
class = LASSO_NODE_GET_CLASS(node);
- return (class->verify_x509_signature(node, ca_certificate_file));
+ return class->verify_x509_signature(node, ca_certificate_file);
}
/*****************************************************************************/
@@ -565,7 +565,7 @@ lasso_node_add_signature_tmpl(LassoNode *node,
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
class = LASSO_NODE_GET_CLASS(node);
- return (class->add_signature_tmpl(node, sign_type, sign_method, reference_id));
+ return class->add_signature_tmpl(node, sign_type, sign_method, reference_id);
}
static gchar *
@@ -575,7 +575,7 @@ lasso_node_build_query(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->build_query(node));
+ return class->build_query(node);
}
static xmlNodePtr
@@ -585,7 +585,7 @@ lasso_node_get_xmlNode(LassoNode *node)
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->get_xmlNode(node));
+ return class->get_xmlNode(node);
}
/**
@@ -635,7 +635,7 @@ lasso_node_serialize(LassoNode *node,
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
class = LASSO_NODE_GET_CLASS(node);
- return (class->serialize(node, gd));
+ return class->serialize(node, gd);
}
static void
@@ -714,7 +714,7 @@ lasso_node_impl_copy(LassoNode *node)
copy = LASSO_NODE(g_object_new(G_OBJECT_TYPE(node), NULL));
lasso_node_set_xmlNode(copy, xmlCopyNode(node->private->node, 1));
- return (copy);
+ return copy;
}
static void
@@ -739,12 +739,12 @@ lasso_node_impl_dump(LassoNode *node,
if (encoding != NULL) {
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL) {
- return (NULL);
+ return NULL;
}
}
buf = xmlAllocOutputBuffer(handler);
if (buf == NULL) {
- return (NULL);
+ return NULL;
}
xmlNodeDumpOutput(buf, NULL, node->private->node,
0, format, encoding);
@@ -757,14 +757,14 @@ lasso_node_impl_dump(LassoNode *node,
}
xmlOutputBufferClose(buf);
- return (ret);
+ return ret;
}
static gchar *
lasso_node_impl_export(LassoNode *node)
{
/* using lasso_node_impl_dump because dump method can be overrided */
- return (lasso_node_impl_dump(node, "utf-8", 0));
+ return lasso_node_impl_dump(node, "utf-8", 0);
}
static gchar *
@@ -778,7 +778,7 @@ lasso_node_impl_export_to_base64(LassoNode *node)
g_free(buffer);
buffer = NULL;
- return (ret);
+ return ret;
}
static gchar *
@@ -826,7 +826,7 @@ lasso_node_impl_export_to_query(LassoNode *node,
}
else {
g_string_free(query, TRUE);
- return (NULL);
+ return NULL;
}
/* add signature in query */
@@ -838,7 +838,7 @@ lasso_node_impl_export_to_query(LassoNode *node,
ret = g_strdup(query->str);
g_string_free(query, TRUE);
- return (ret);
+ return ret;
}
static gchar *
@@ -868,7 +868,7 @@ lasso_node_impl_export_to_soap(LassoNode *node)
lasso_node_destroy(body);
lasso_node_destroy(envelope);
- return(buffer);
+ return buffer;
}
static LassoAttr*
@@ -888,7 +888,7 @@ lasso_node_impl_get_attr(LassoNode *node,
prop = node->private->node->properties;
while (prop != NULL) {
if (xmlStrEqual(prop->name, name)) {
- return (prop);
+ return prop;
}
prop = prop->next;
}
@@ -898,7 +898,7 @@ lasso_node_impl_get_attr(LassoNode *node,
LASSO_XML_ERROR_ATTR_NOT_FOUND,
lasso_strerror(LASSO_XML_ERROR_ATTR_NOT_FOUND),
name, node->private->node->name);
- return (NULL);
+ return NULL;
}
static xmlChar *
@@ -923,7 +923,7 @@ lasso_node_impl_get_attr_value(LassoNode *node,
name, node->private->node->name);
}
- return (value);
+ return value;
}
static GPtrArray *
@@ -943,7 +943,7 @@ lasso_node_impl_get_attrs(LassoNode *node)
prop = prop->next;
}
- return (attributes);
+ return attributes;
}
static LassoNode *
@@ -1014,14 +1014,14 @@ lasso_node_impl_get_child(LassoNode *node,
child = xmlSecFindNode(node->private->node, name, lassoLassoHRef);
}
if (child != NULL) {
- return (lasso_node_new_from_xmlNode(child));
+ return lasso_node_new_from_xmlNode(child);
}
else {
g_set_error(err, g_quark_from_string("Lasso"),
LASSO_XML_ERROR_NODE_NOT_FOUND,
lasso_strerror(LASSO_XML_ERROR_NODE_NOT_FOUND),
name, node->private->node->name);
- return (NULL);
+ return NULL;
}
}
@@ -1055,7 +1055,7 @@ lasso_node_impl_get_child_content(LassoNode *node,
g_propagate_error (err, tmp_err);
}
- return (content);
+ return content;
}
static GPtrArray *
@@ -1075,7 +1075,7 @@ lasso_node_impl_get_children(LassoNode *node)
cur = cur->next;
}
- return (children);
+ return children;
}
static xmlChar *
@@ -1092,7 +1092,7 @@ lasso_node_impl_get_content(LassoNode *node,
node->private->node->name);
}
- return (content);
+ return content;
}
static xmlChar *
@@ -1100,7 +1100,7 @@ lasso_node_impl_get_name(LassoNode *node)
{
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
- return (xmlStrdup(node->private->node->name));
+ return xmlStrdup(node->private->node->name);
}
static void
@@ -1234,7 +1234,7 @@ lasso_node_impl_verify_signature(LassoNode *node,
xmlSecDSigCtxDestroy(dsigCtx);
}
/* FIXME xmlFreeDoc(doc); */
- return (ret);
+ return ret;
}
static gint
@@ -1342,7 +1342,7 @@ lasso_node_impl_verify_x509_signature(LassoNode *node,
xmlSecKeysMngrDestroy(mngr);
}
/* FIXME xmlFreeDoc(doc); */
- return (ret);
+ return ret;
}
/*** private methods **********************************************************/
@@ -1400,7 +1400,7 @@ lasso_node_impl_add_signature(LassoNode *node,
ret = lasso_node_sign_signature_tmpl(node, private_key_file, certificate_file);
}
- return (ret);
+ return ret;
}
static gint
@@ -1434,7 +1434,7 @@ lasso_node_impl_add_signature_tmpl(LassoNode *node,
if (signature == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Failed to create signature template\n");
- return (LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED);
+ return LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
}
/* uri = xmlMalloc(strlen(reference_uri)+1+1); */
@@ -1454,14 +1454,14 @@ lasso_node_impl_add_signature_tmpl(LassoNode *node,
if (reference == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Failed to add reference to signature template\n");
xmlFreeNode(signature);
- return (LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED);
+ return LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
}
/* add enveloped transform */
if (xmlSecTmplReferenceAddTransform(reference, xmlSecTransformEnvelopedId) == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Failed to add enveloped transform to reference\n");
xmlFreeNode(signature);
- return (LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED);
+ return LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
}
/* add */
@@ -1469,7 +1469,7 @@ lasso_node_impl_add_signature_tmpl(LassoNode *node,
if (key_info == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Failed to add key info\n");
xmlFreeNode(signature);
- return (LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED);
+ return LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
}
/* add */
@@ -1477,7 +1477,7 @@ lasso_node_impl_add_signature_tmpl(LassoNode *node,
if (xmlSecTmplKeyInfoAddX509Data(key_info) == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Failed to add X509Data node\n");
xmlFreeNode(signature);
- return (LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED);
+ return LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
}
}
@@ -1489,7 +1489,7 @@ lasso_node_impl_add_signature_tmpl(LassoNode *node,
/* xmlUnlinkNode(lasso_node_get_xmlNode(node)); */
/* xmlFreeDoc(doc); */
- return (0);
+ return 0;
}
static void
@@ -1558,7 +1558,7 @@ lasso_node_impl_build_query(LassoNode *node)
ret = g_strdup(query->str);
g_string_free(query, TRUE);
- return (ret);
+ return ret;
}
static xmlNodePtr
@@ -1566,7 +1566,7 @@ lasso_node_impl_get_xmlNode(LassoNode *node)
{
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
- return (node->private->node);
+ return node->private->node;
}
static void
@@ -1699,7 +1699,7 @@ lasso_node_impl_serialize(LassoNode *node,
g_ptr_array_free(children, TRUE);
}
- return (gd);
+ return gd;
}
static void
@@ -1786,7 +1786,7 @@ lasso_node_impl_sign_signature_tmpl(LassoNode *node,
if (dsig_ctx == NULL) {
message(G_LOG_LEVEL_CRITICAL,
lasso_strerror(LASSO_DS_ERROR_CONTEXT_CREATION_FAILED));
- return(LASSO_DS_ERROR_CONTEXT_CREATION_FAILED);
+ return LASSO_DS_ERROR_CONTEXT_CREATION_FAILED;
}
/* load private key, assuming that there is not password */
@@ -1827,7 +1827,7 @@ lasso_node_impl_sign_signature_tmpl(LassoNode *node,
/* xmlUnlinkNode(lasso_node_get_xmlNode(node)); */
/* xmlFreeDoc(doc); */
- return (ret);
+ return ret;
}
/*****************************************************************************/
@@ -1963,7 +1963,7 @@ GType lasso_node_get_type() {
LassoNode*
lasso_node_new()
{
- return (LASSO_NODE(g_object_new(LASSO_TYPE_NODE, NULL)));
+ return LASSO_NODE(g_object_new(LASSO_TYPE_NODE, NULL));
}
/**
@@ -1992,7 +1992,7 @@ lasso_node_new_from_dump(const gchar *buffer)
/* free doc */
xmlFreeDoc(doc);
- return (node);
+ return node;
}
/**
@@ -2014,5 +2014,5 @@ lasso_node_new_from_xmlNode(xmlNodePtr node)
lasso_node_set_xmlNode(lasso_node, node);
lasso_node->private->node_is_weak_ref = TRUE;
- return (lasso_node);
+ return lasso_node;
}