Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Oct 13, 2023
1 parent 05fed5c commit 100c9a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion source/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ static void s_error_map_init(void) {
{PyExc_ValueError, AWS_ERROR_INVALID_ARGUMENT},
{PyExc_FileNotFoundError, AWS_ERROR_FILE_INVALID_PATH},
{PyExc_BlockingIOError, AWS_IO_READ_WOULD_BLOCK},
{PyExc_BrokenPipeError, AWS_IO_BROKEN_PIPE}};
{PyExc_BrokenPipeError, AWS_IO_BROKEN_PIPE},
};

if (aws_hash_table_init(
&s_py_to_aws_error_map,
Expand Down
8 changes: 2 additions & 6 deletions source/mqtt5_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ static void s_on_publish_received(const struct aws_mqtt5_packet_publish_view *pu
/* i */ (int)(publish_packet->payload_format ? *publish_packet->payload_format : 0),
/* O */ publish_packet->message_expiry_interval_seconds ? Py_True : Py_False,
/* I */
(unsigned int)(publish_packet->message_expiry_interval_seconds
? *publish_packet->message_expiry_interval_seconds
: 0),
(unsigned int)(publish_packet->message_expiry_interval_seconds ? *publish_packet->message_expiry_interval_seconds : 0),
/* O */ publish_packet->topic_alias ? Py_True : Py_False,
/* H */ (unsigned short)(publish_packet->topic_alias ? *publish_packet->topic_alias : 0),
/* s */ publish_packet->response_topic ? publish_packet->response_topic->ptr : NULL,
Expand Down Expand Up @@ -541,9 +539,7 @@ static void s_lifecycle_event_disconnection(
/* i */ (int)(disconnect ? disconnect->reason_code : 0),
/* O */ (disconnect && disconnect->session_expiry_interval_seconds) ? Py_True : Py_False,
/* I */
(unsigned int)((disconnect && disconnect->session_expiry_interval_seconds)
? *disconnect->session_expiry_interval_seconds
: 0),
(unsigned int)((disconnect && disconnect->session_expiry_interval_seconds) ? *disconnect->session_expiry_interval_seconds : 0),
/* s */ (disconnect && disconnect->reason_string) ? disconnect->reason_string->ptr : NULL,
/* # */ (disconnect && disconnect->reason_string) ? disconnect->reason_string->len : 0,
/* O */ user_property_count > 0 ? user_properties_list : Py_None,
Expand Down

0 comments on commit 100c9a5

Please sign in to comment.