From da4e23d09cb5edb56c70ccc090d7929a72122043 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Fri, 13 Aug 2004 15:16:13 +0000 Subject: declarations first (and s/lenght/length/) --- lasso/Attic/protocols/artifact.c | 17 +++++++++-------- lasso/Attic/protocols/authn_request.c | 8 ++++---- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'lasso/Attic') diff --git a/lasso/Attic/protocols/artifact.c b/lasso/Attic/protocols/artifact.c index 6b8015ef..15cff94c 100644 --- a/lasso/Attic/protocols/artifact.c +++ b/lasso/Attic/protocols/artifact.c @@ -276,14 +276,14 @@ lasso_artifact_new(gchar *samlArt, gchar *assertionHandle, gchar *relayState) { - g_return_val_if_fail(byteCode != NULL, NULL); - g_return_val_if_fail(identityProviderSuccinctID != NULL, NULL); - g_return_val_if_fail(assertionHandle != NULL, NULL); - LassoNode *artifact; LassoNodeClass *class; xmlChar *b64_identityProviderSuccinctID; + g_return_val_if_fail(byteCode != NULL, NULL); + g_return_val_if_fail(identityProviderSuccinctID != NULL, NULL); + g_return_val_if_fail(assertionHandle != NULL, NULL); + artifact = LASSO_NODE(g_object_new(LASSO_TYPE_ARTIFACT, NULL)); class = LASSO_NODE_GET_CLASS(artifact); @@ -305,14 +305,15 @@ lasso_artifact_new(gchar *samlArt, LassoNode* lasso_artifact_new_from_query(const xmlChar *query) { - g_return_val_if_fail(query != NULL, NULL); - LassoNode *artifact = NULL; GData *gd; gchar *b64_samlArt, *relayState; gchar *byteCode, *identityProviderSuccinctID, *assertionHandle; gint ret; + g_return_val_if_fail(query != NULL, NULL); + + gd = lasso_query_to_dict(query); b64_samlArt = g_strdup(lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "SAMLart"), 0)); relayState = g_strdup(lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "RelayState"), 0)); @@ -350,12 +351,12 @@ LassoNode* lasso_artifact_new_from_lares(const xmlChar *lares, const xmlChar *relayState) { - g_return_val_if_fail(lares != NULL, NULL); - LassoNode *artifact = NULL; gchar *byteCode, *identityProviderSuccinctID, *assertionHandle; gint ret; + g_return_val_if_fail(lares != NULL, NULL); + byteCode = (gchar *) g_new0(gchar, 5+1); identityProviderSuccinctID = (gchar *) g_new0(gchar, 20); assertionHandle = (gchar *) g_new0(gchar, 20+1); diff --git a/lasso/Attic/protocols/authn_request.c b/lasso/Attic/protocols/authn_request.c index cf78c0c5..d7f5a6ac 100644 --- a/lasso/Attic/protocols/authn_request.c +++ b/lasso/Attic/protocols/authn_request.c @@ -52,11 +52,11 @@ lasso_authn_request_set_requestAuthnContext(LassoAuthnRequest *request, GPtrArray *authnContextStatementRefs, const xmlChar *authnContextComparison) { - g_return_if_fail (LASSO_IS_AUTHN_REQUEST(request)); - LassoNode *request_authn_context; gint i; + g_return_if_fail (LASSO_IS_AUTHN_REQUEST(request)); + /* all arguments are optional however, we need at least one to create the RequestAuthnContext element @@ -98,10 +98,10 @@ void lasso_authn_request_set_scoping(LassoAuthnRequest *request, gint proxyCount) { - g_return_if_fail (LASSO_IS_AUTHN_REQUEST(request)); - LassoNode *scoping; + g_return_if_fail (LASSO_IS_AUTHN_REQUEST(request)); + /* create a new Scoping instance */ scoping = lasso_lib_scoping_new(); /* ProxyCount */ -- cgit