Skip to content

Commit 3b520ea

Browse files
Fix macro usage (#411)
* consistent macro calls
1 parent d6668f0 commit 3b520ea

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

source/h2_connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,15 +1565,15 @@ static struct aws_h2err s_decoder_on_window_update(uint32_t stream_id, uint32_t
15651565
/* Let's update the connection flow-control window size */
15661566
if (window_size_increment == 0) {
15671567
/* flow-control window increment of 0 MUST be treated as error (RFC7540 6.9.1) */
1568-
CONNECTION_LOG(ERROR, connection, "Window update frame with 0 increment size")
1568+
CONNECTION_LOG(ERROR, connection, "Window update frame with 0 increment size");
15691569
return aws_h2err_from_h2_code(AWS_HTTP2_ERR_PROTOCOL_ERROR);
15701570
}
15711571
if (connection->thread_data.window_size_peer + window_size_increment > AWS_H2_WINDOW_UPDATE_MAX) {
15721572
/* We MUST NOT allow a flow-control window to exceed the max */
15731573
CONNECTION_LOG(
15741574
ERROR,
15751575
connection,
1576-
"Window update frame causes the connection flow-control window exceeding the maximum size")
1576+
"Window update frame causes the connection flow-control window exceeding the maximum size");
15771577
return aws_h2err_from_h2_code(AWS_HTTP2_ERR_FLOW_CONTROL_ERROR);
15781578
}
15791579
if (connection->thread_data.window_size_peer <= AWS_H2_MIN_WINDOW_SIZE) {

source/h2_decoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static const size_t s_decoder_cookie_buffer_initial_size = 512;
3737
#define DECODER_CALL_VTABLE(decoder, fn) \
3838
do { \
3939
if ((decoder)->vtable->fn) { \
40-
DECODER_LOG(TRACE, decoder, "Invoking callback " #fn) \
40+
DECODER_LOG(TRACE, decoder, "Invoking callback " #fn); \
4141
struct aws_h2err vtable_err = (decoder)->vtable->fn((decoder)->userdata); \
4242
if (aws_h2err_failed(vtable_err)) { \
4343
DECODER_LOGF( \
@@ -53,7 +53,7 @@ static const size_t s_decoder_cookie_buffer_initial_size = 512;
5353
#define DECODER_CALL_VTABLE_ARGS(decoder, fn, ...) \
5454
do { \
5555
if ((decoder)->vtable->fn) { \
56-
DECODER_LOG(TRACE, decoder, "Invoking callback " #fn) \
56+
DECODER_LOG(TRACE, decoder, "Invoking callback " #fn); \
5757
struct aws_h2err vtable_err = (decoder)->vtable->fn(__VA_ARGS__, (decoder)->userdata); \
5858
if (aws_h2err_failed(vtable_err)) { \
5959
DECODER_LOGF( \

source/hpack_decoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void aws_hpack_decoder_clean_up(struct aws_hpack_decoder *decoder) {
3535

3636
static const struct aws_http_header *s_get_header_u64(const struct aws_hpack_decoder *decoder, uint64_t index) {
3737
if (index > SIZE_MAX) {
38-
HPACK_LOG(ERROR, decoder, "Header index is absurdly large")
38+
HPACK_LOG(ERROR, decoder, "Header index is absurdly large");
3939
aws_raise_error(AWS_ERROR_INVALID_INDEX);
4040
return NULL;
4141
}

source/hpack_encoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ int aws_hpack_encode_header_block(
382382
ERROR,
383383
encoder,
384384
"Integer encoding failed for table size update entry, integer: %zu",
385-
smallest_update_value)
385+
smallest_update_value);
386386
return AWS_OP_ERR;
387387
}
388388
}
@@ -396,7 +396,7 @@ int aws_hpack_encode_header_block(
396396
uint8_t num_prefix_bits = s_hpack_entry_num_prefix_bits[AWS_HPACK_ENTRY_DYNAMIC_TABLE_RESIZE];
397397
if (aws_hpack_encode_integer(last_update_value, starting_bit_pattern, num_prefix_bits, output)) {
398398
HPACK_LOGF(
399-
ERROR, encoder, "Integer encoding failed for table size update entry, integer: %zu", last_update_value)
399+
ERROR, encoder, "Integer encoding failed for table size update entry, integer: %zu", last_update_value);
400400
return AWS_OP_ERR;
401401
}
402402

source/websocket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,8 +1683,8 @@ struct aws_http_message *aws_http_message_new_websocket_handshake_request(
16831683
struct aws_byte_cursor host) {
16841684

16851685
AWS_PRECONDITION(allocator);
1686-
AWS_PRECONDITION(aws_byte_cursor_is_valid(&path))
1687-
AWS_PRECONDITION(aws_byte_cursor_is_valid(&host))
1686+
AWS_PRECONDITION(aws_byte_cursor_is_valid(&path));
1687+
AWS_PRECONDITION(aws_byte_cursor_is_valid(&host));
16881688

16891689
struct aws_http_message *request = aws_http_message_new_request(allocator);
16901690
if (!request) {

tests/fuzz/fuzz_h2_decoder_correct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
253253

254254
struct aws_stream_status body_status;
255255
aws_input_stream_get_status(body, &body_status);
256-
AWS_FATAL_ASSERT(body_complete == body_status.is_end_of_stream)
256+
AWS_FATAL_ASSERT(body_complete == body_status.is_end_of_stream);
257257
aws_input_stream_release(body);
258258
break;
259259
}

tests/test_websocket_bootstrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static struct aws_websocket *s_mock_websocket = (void *)"websocket";
236236

237237
static int s_mock_http_client_connect(const struct aws_http_client_connection_options *options) {
238238
AWS_FATAL_ASSERT(options);
239-
AWS_FATAL_ASSERT(!s_tester.http_connect_called_successfully)
239+
AWS_FATAL_ASSERT(!s_tester.http_connect_called_successfully);
240240

241241
if (s_tester.fail_at_step == BOOT_STEP_HTTP_CONNECT) {
242242
return aws_raise_error(BOOT_STEP_HTTP_CONNECT);

0 commit comments

Comments
 (0)