Skip to content

Commit

Permalink
remove unnecessary error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm committed Feb 13, 2024
1 parent 3afc122 commit 45517af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions source/event_stream_rpc_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,16 +499,6 @@ static int s_send_protocol_message(

struct event_stream_connection_send_message_args *args =
aws_mem_calloc(connection->allocator, 1, sizeof(struct event_stream_connection_send_message_args));

if (!args) {
AWS_LOGF_ERROR(
AWS_LS_EVENT_STREAM_RPC_CLIENT,
"id=%p: failed to allocate callback arguments %s.",
(void *)connection,
aws_error_debug_str(aws_last_error()));
return AWS_OP_ERR;
}

args->allocator = connection->allocator;
args->user_data = user_data;
args->message_type = message_args->message_type;
Expand Down
10 changes: 0 additions & 10 deletions source/event_stream_rpc_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,16 +570,6 @@ static int s_send_protocol_message(

struct event_stream_connection_send_message_args *args =
aws_mem_calloc(connection->allocator, 1, sizeof(struct event_stream_connection_send_message_args));

if (!args) {
AWS_LOGF_ERROR(
AWS_LS_EVENT_STREAM_RPC_SERVER,
"id=%p: allocation of callback args failed with error %s",
(void *)connection,
aws_error_debug_str(aws_last_error()));
return AWS_OP_ERR;
}

args->allocator = connection->allocator;
args->user_data = user_data;
args->message_type = message_args->message_type;
Expand Down

0 comments on commit 45517af

Please sign in to comment.