Skip to content

Commit e5350ed

Browse files
committed
real wip
1 parent 83aaf18 commit e5350ed

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

source/h1_encoder.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,12 +1053,11 @@ static int s_encoder_state_data_write_body(struct aws_h1_encoder *encoder, struc
10531053
}
10541054

10551055
/* Read from stream */
1056-
int error_code = AWS_OP_ERR;
1057-
10581056
ENCODER_LOG(TRACE, encoder, "Reading from manual data write stream");
10591057
const size_t prev_len = dst->len;
10601058
int err = aws_input_stream_read(data_write->data, dst);
1061-
amount_read = dst->len - prev_len;
1059+
const size_t amount_read = dst->len - prev_len;
1060+
int error_code = AWS_OP_ERR;
10621061

10631062
if (err) {
10641063
ENCODER_LOGF(
@@ -1093,7 +1092,7 @@ static int s_encoder_state_data_write_body(struct aws_h1_encoder *encoder, struc
10931092

10941093
/* If we read something or reached end of stream, check if stream is complete */
10951094
struct aws_stream_status status;
1096-
int err = aws_input_stream_get_status(data_write->data, &status);
1095+
err = aws_input_stream_get_status(data_write->data, &status);
10971096
if (err) {
10981097
ENCODER_LOGF(
10991098
ERROR,

0 commit comments

Comments
 (0)