Skip to content

Commit

Permalink
Fix macro usage (#181)
Browse files Browse the repository at this point in the history
* fix macro calls
  • Loading branch information
DmitriyMusatkin committed Dec 28, 2022
1 parent a6e3924 commit bad1066
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion source/aws_signing.c
Original file line number Diff line number Diff line change
Expand Up @@ -2500,7 +2500,7 @@ int aws_verify_sigv4a_signing(
aws_credentials_release(signing_state->config.credentials);
signing_state->config.credentials = ecc_credentials;
if (signing_state->config.credentials == NULL) {
AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials")
AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials");
goto done;
}
}
Expand Down
4 changes: 2 additions & 2 deletions source/credentials_provider_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct
if (!command_buf.len) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Failed to resolve credentials_process command during process credentials provider initialization.")
"Failed to resolve credentials_process command during process credentials provider initialization.");
goto on_finish;
}

Expand All @@ -202,7 +202,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct

AWS_LOGF_DEBUG(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Successfully loaded credentials_process command for process credentials provider.")
"Successfully loaded credentials_process command for process credentials provider.");

on_finish:
aws_string_destroy(profile_name);
Expand Down
14 changes: 7 additions & 7 deletions source/credentials_provider_sts_web_identity.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static bool s_parse_retryable_error_from_response(struct aws_allocator *allocato
if (xml_parser == NULL) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Failed to init xml parser for sts web identity credentials provider to parse error information.")
"Failed to init xml parser for sts web identity credentials provider to parse error information.");
return false;
}
bool get_retryable_error = false;
Expand Down Expand Up @@ -330,14 +330,14 @@ static struct aws_credentials *s_parse_credentials_from_response(
if (xml_parser == NULL) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Failed to init xml parser for sts web identity credentials provider to parse error information.")
"Failed to init xml parser for sts web identity credentials provider to parse error information.");
return NULL;
}
uint64_t now = UINT64_MAX;
if (aws_sys_clock_get_ticks(&now) != AWS_OP_SUCCESS) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Failed to get sys clock for sts web identity credentials provider to parse error information.")
"Failed to get sys clock for sts web identity credentials provider to parse error information.");
goto on_finish;
}
uint64_t now_seconds = aws_timestamp_convert(now, AWS_TIMESTAMP_NANOS, AWS_TIMESTAMP_SECS, NULL);
Expand Down Expand Up @@ -998,7 +998,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Failed to resolve either region, role arn or token file path during sts web identity provider "
"initialization.")
"initialization.");
goto on_finish;

} else {
Expand All @@ -1021,7 +1021,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator
aws_byte_buf_init_copy_from_cursor(&parameters->role_arn, allocator, aws_byte_cursor_from_string(role_arn))) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Failed to resolve role arn during sts web identity provider initialization.")
"Failed to resolve role arn during sts web identity provider initialization.");
goto on_finish;
}

Expand All @@ -1031,7 +1031,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator
&parameters->token_file_path, allocator, aws_byte_cursor_from_string(token_file_path))) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Failed to resolve token file path during sts web identity provider initialization.")
"Failed to resolve token file path during sts web identity provider initialization.");
goto on_finish;
}

Expand All @@ -1047,7 +1047,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator

AWS_LOGF_DEBUG(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Successfully loaded all required parameters for sts web identity credentials provider.")
"Successfully loaded all required parameters for sts web identity credentials provider.");
success = true;

on_finish:
Expand Down
2 changes: 1 addition & 1 deletion source/credentials_provider_x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ struct aws_credentials_provider *aws_credentials_provider_new_x509(
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"To create an X.509 creds provider, a tls_connection_options, an IoT thing name and an IAM role alias are "
"required.")
"required.");
goto on_error;
}

Expand Down
6 changes: 3 additions & 3 deletions source/credentials_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static bool s_parse_expiration_value_from_json_object(

if (expiration_cursor.len == 0) {
AWS_LOGF_INFO(
AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration.")
AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration.");
return false;
}

Expand Down Expand Up @@ -211,7 +211,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object(
if (access_key_id_cursor.len == 0 || secrete_access_key_cursor.len == 0) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER,
"Parsed an unexpected credentials json document, either access key, secret key is empty.")
"Parsed an unexpected credentials json document, either access key, secret key is empty.");
goto done;
}

Expand All @@ -222,7 +222,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object(
aws_json_value_get_string(token, &session_token_cursor);
if (options->token_required && session_token_cursor.len == 0) {
AWS_LOGF_ERROR(
AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token.")
AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token.");
goto done;
}
}
Expand Down

0 comments on commit bad1066

Please sign in to comment.