Initialize all uninitialized rc variables
This commit is contained in:
parent
9cc0ff6d43
commit
a041a2ef81
|
@ -1725,7 +1725,7 @@ gint
|
|||
lasso_login_init_idp_initiated_authn_request(LassoLogin *login,
|
||||
const gchar *remote_providerID)
|
||||
{
|
||||
int rc;
|
||||
int rc = 0;
|
||||
LassoProfile *profile;
|
||||
|
||||
profile = LASSO_PROFILE(login);
|
||||
|
@ -2253,7 +2253,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
|||
{
|
||||
LassoLogin *login = LASSO_LOGIN(node);
|
||||
xmlNode *t;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
if (rc) return rc;
|
||||
|
|
|
@ -811,7 +811,7 @@ lasso_logout_process_response_msg(LassoLogout *logout, gchar *response_msg)
|
|||
LassoHttpMethod response_method;
|
||||
LassoMessageFormat format;
|
||||
LassoLibStatusResponse *response;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_LOGOUT(logout), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(response_msg != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
@ -1260,7 +1260,7 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
|
|||
static int
|
||||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
if (rc == 0) {
|
||||
|
|
|
@ -353,7 +353,7 @@ lasso_name_identifier_mapping_process_response_msg(LassoNameIdentifierMapping *m
|
|||
LassoProvider *remote_provider;
|
||||
LassoMessageFormat format;
|
||||
LassoLibNameIdentifierMappingResponse *response;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
char *statusCodeValue;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_NAME_IDENTIFIER_MAPPING(mapping),
|
||||
|
|
|
@ -453,7 +453,7 @@ lasso_name_registration_process_response_msg(LassoNameRegistration *name_registr
|
|||
LassoHttpMethod response_method;
|
||||
LassoLibStatusResponse *response;
|
||||
LassoMessageFormat format;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
char *statusCodeValue;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_NAME_REGISTRATION(name_registration),
|
||||
|
|
|
@ -209,7 +209,7 @@ lasso_idwsf2_discovery_status2rc(LassoIdWsf2UtilStatus *status)
|
|||
size_t i = 0;
|
||||
static struct {
|
||||
const char *code;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
} code2rc[] = {
|
||||
{ LASSO_IDWSF2_DISCOVERY_STATUS_CODE_OK, 0},
|
||||
{ LASSO_IDWSF2_DISCOVERY_STATUS_CODE_FAILED, LASSO_IDWSF2_DISCOVERY_ERROR_FAILED },
|
||||
|
|
|
@ -70,7 +70,7 @@ lasso_server_create_assertion_as_idwsf2_security_token(LassoServer *server,
|
|||
LassoProvider *audience)
|
||||
{
|
||||
LassoSaml2Assertion *assertion;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
if (! LASSO_IS_SERVER(server))
|
||||
return NULL;
|
||||
|
|
|
@ -665,7 +665,7 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
|
|||
static int
|
||||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
if (rc) return rc;
|
||||
|
|
|
@ -454,7 +454,7 @@ lasso_discovery_process_modify_response_msg(LassoDiscovery *discovery, const gch
|
|||
{
|
||||
LassoWsfProfile *profile = NULL;
|
||||
LassoDiscoModifyResponse *response = NULL;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_DISCOVERY(discovery), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(message != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
|
|
@ -304,7 +304,7 @@ lasso_assertion_query_validate_request(LassoAssertionQuery *assertion_query)
|
|||
LassoProfile *profile;
|
||||
LassoProvider *remote_provider;
|
||||
LassoSamlp2StatusResponse *response;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_ASSERTION_QUERY(assertion_query),
|
||||
LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
@ -335,7 +335,7 @@ lasso_assertion_query_build_response_msg(LassoAssertionQuery *assertion_query)
|
|||
{
|
||||
LassoProfile *profile;
|
||||
LassoSamlp2StatusResponse *response;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_ASSERTION_QUERY(assertion_query),
|
||||
LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
@ -380,7 +380,7 @@ lasso_assertion_query_process_response_msg(
|
|||
{
|
||||
LassoProfile *profile;
|
||||
LassoSamlp2StatusResponse *response;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
lasso_bad_param(ASSERTION_QUERY, assertion_query);
|
||||
profile = &assertion_query->parent;
|
||||
|
|
|
@ -954,7 +954,7 @@ gint
|
|||
lasso_saml20_login_process_request_msg(LassoLogin *login, gchar *request_msg)
|
||||
{
|
||||
LassoProfile *profile = LASSO_PROFILE(login);
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
rc = lasso_saml20_profile_process_artifact_resolve(profile, request_msg);
|
||||
if (rc != 0) {
|
||||
|
@ -1082,7 +1082,7 @@ gint
|
|||
lasso_saml20_login_process_response_msg(LassoLogin *login, gchar *response_msg)
|
||||
{
|
||||
LassoProfile *profile = LASSO_PROFILE(login);
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
rc = lasso_saml20_profile_process_artifact_response(profile, response_msg);
|
||||
if (rc) {
|
||||
|
|
|
@ -338,7 +338,7 @@ int
|
|||
lasso_saml20_profile_process_artifact_resolve(LassoProfile *profile, const char *msg)
|
||||
{
|
||||
LassoProvider *remote_provider;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
/* FIXME: parse only one time the message, reuse the parsed document for signature
|
||||
* validation */
|
||||
|
@ -474,7 +474,7 @@ lasso_saml20_profile_set_session_from_dump_decrypt(
|
|||
assertion->Subject->EncryptedID->original_data);
|
||||
lasso_release_gobject(assertion->Subject->EncryptedID);
|
||||
} else { /* decrypt */
|
||||
int rc;
|
||||
int rc = 0;
|
||||
rc = lasso_saml2_encrypted_element_decrypt(assertion->Subject->EncryptedID,
|
||||
lasso_server_get_encryption_private_key(profile->server),
|
||||
(LassoNode**) &assertion->Subject->NameID);
|
||||
|
|
|
@ -112,7 +112,7 @@ static int
|
|||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
LassoDstModify *modify = LASSO_DST_MODIFY(node);
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
if (rc) {
|
||||
|
|
|
@ -91,7 +91,7 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
|
|||
static int
|
||||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
int rc;
|
||||
int rc = 0;
|
||||
LassoDstModifyResponse *response = LASSO_DST_MODIFY_RESPONSE(node);
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
|
|
|
@ -103,7 +103,7 @@ static int
|
|||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
LassoDstQuery *query = LASSO_DST_QUERY(node);
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
if (rc) {
|
||||
|
|
|
@ -106,7 +106,7 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
|
|||
static int
|
||||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
int rc;
|
||||
int rc = 0;
|
||||
LassoDstQueryResponse *response = LASSO_DST_QUERY_RESPONSE(node);
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
|
|
|
@ -89,7 +89,7 @@ static int
|
|||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
LassoMiscTextNode *n = LASSO_MISC_TEXT_NODE(node);
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
if (xmlnode->type == XML_TEXT_NODE) {
|
||||
n->text_child = TRUE;
|
||||
|
|
|
@ -1030,7 +1030,7 @@ lasso_node_build_deflated_query(LassoNode *node)
|
|||
xmlChar *ret, *b64_ret;
|
||||
char *rret;
|
||||
unsigned long in_len;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
z_stream stream;
|
||||
|
||||
xmlnode = lasso_node_get_xmlNode(node, FALSE);
|
||||
|
|
|
@ -90,7 +90,7 @@ static struct XmlSnippet schema_snippets[] = {
|
|||
static int
|
||||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
int rc;
|
||||
int rc = 0;
|
||||
xmlNode *password;
|
||||
xmlChar *kind;
|
||||
LassoWsseUsernameTokenPrivate *private = LASSO_WSSE_USERNAME_TOKEN_GET_PRIVATE(node);
|
||||
|
|
|
@ -1911,7 +1911,7 @@ lasso_node_new_from_xmlNode_with_type(xmlNode *xmlnode, char *typename)
|
|||
{
|
||||
GType gtype;
|
||||
LassoNode *node;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
if (typename == NULL)
|
||||
return lasso_node_new_from_xmlNode(xmlnode); /* will auto-detect */
|
||||
|
@ -1981,7 +1981,7 @@ lasso_node_init_from_message_with_format(LassoNode *node, const char *message, L
|
|||
/* BASE64 case */
|
||||
if (any || constraint == LASSO_MESSAGE_FORMAT_BASE64) {
|
||||
if (message[0] != 0 && is_base64(message)) {
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
msg = g_malloc(strlen(message));
|
||||
rc = xmlSecBase64Decode((xmlChar*)message, (xmlChar*)msg, strlen(message));
|
||||
|
|
|
@ -139,7 +139,7 @@ START_TEST(test02_serviceProviderLogin)
|
|||
LassoServer *spContext, *idpContext;
|
||||
LassoLogin *spLoginContext, *idpLoginContext;
|
||||
LassoLibAuthnRequest *request;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
char *relayState;
|
||||
char *authnRequestUrl, *authnRequestQuery;
|
||||
char *responseUrl, *responseQuery;
|
||||
|
@ -315,7 +315,7 @@ START_TEST(test03_serviceProviderLogin)
|
|||
LassoServer *spContext, *idpContext;
|
||||
LassoLogin *spLoginContext, *idpLoginContext;
|
||||
LassoLibAuthnRequest *request;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
char *relayState;
|
||||
char *authnRequestUrl, *authnRequestQuery;
|
||||
char *responseUrl, *responseQuery;
|
||||
|
|
|
@ -141,7 +141,7 @@ START_TEST(test02_saml2_serviceProviderLogin)
|
|||
LassoLogin *spLoginContext = NULL, *idpLoginContext = NULL;
|
||||
LassoLogout *spLogoutContext = NULL, *idpLogoutContext = NULL;
|
||||
LassoSamlp2AuthnRequest *request = NULL;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
char *relayState = NULL;
|
||||
char *authnRequestUrl = NULL, *authnRequestQuery = NULL;
|
||||
char *logoutRequestUrl = NULL, *logoutRequestQuery = NULL;
|
||||
|
@ -352,7 +352,7 @@ START_TEST(test03_saml2_serviceProviderLogin)
|
|||
char *spIdentityContextDump = NULL;
|
||||
char *spSessionDump = NULL;
|
||||
char *idpLoginDump = NULL;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
serviceProviderContextDump = generateServiceProviderContextDump();
|
||||
spContext = lasso_server_new_from_dump(serviceProviderContextDump);
|
||||
|
|
|
@ -34,7 +34,7 @@ create_authn_response_msg(char *query)
|
|||
LassoServer *server;
|
||||
LassoLogin *login;
|
||||
char *t;
|
||||
int rc;
|
||||
int rc = 0;
|
||||
|
||||
server = lasso_server_new(
|
||||
TESTSDATADIR "/idp1-la/metadata.xml",
|
||||
|
|
|
@ -57,7 +57,7 @@ SuiteFunction suites[] = {
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int rc;
|
||||
int rc = 0;
|
||||
SRunner *sr;
|
||||
int i;
|
||||
int dont_fork = 0;
|
||||
|
|
Loading…
Reference in New Issue