Skip to content

Commit 27e5818

Browse files
committed
lint
1 parent e328bca commit 27e5818

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/native/crt.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,9 @@ jobject aws_jni_direct_byte_buffer_from_raw_ptr(JNIEnv *env, const void *dst, si
438438
if (jByteBuf) {
439439
aws_jni_byte_buffer_set_limit(env, jByteBuf, (jint)capacity);
440440
aws_jni_byte_buffer_set_position(env, jByteBuf, 0);
441-
} else{
441+
} else {
442442
if (aws_jni_check_and_clear_exception(env)) {
443-
result = aws_raise_error(AWS_ERROR_HTTP_CALLBACK_FAILURE);
444-
(*env)->DeleteLocalRef(env, direct_buffer);
443+
(void)aws_raise_error(AWS_ERROR_HTTP_CALLBACK_FAILURE);
445444
}
446445
}
447446

src/native/http_request_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int s_aws_input_stream_read(struct aws_input_stream *stream, struct aws_b
9898
/* Newer updates allow part sizes up to 5GB. Since number of bytes required for a 5GB part is
9999
greater than INT_MAX, it would cause a bug where the java does not allocate memory and return a null buffer
100100
since Java natively does not support direct allocation of buffers of capacity > Integer.MAX_VALUE. */
101-
while(out_remaining > 0) {
101+
while (out_remaining > 0) {
102102
size_t chunk_size = INT_MAX;
103103
if (out_remaining <= chunk_size) {
104104
chunk_size = out_remaining;
@@ -116,7 +116,7 @@ static int s_aws_input_stream_read(struct aws_input_stream *stream, struct aws_b
116116
}
117117

118118
size_t amt_written = aws_jni_byte_buffer_get_position(env, direct_buffer);
119-
if(amt_written == 0) {
119+
if (amt_written == 0) {
120120
(*env)->DeleteLocalRef(env, direct_buffer);
121121
break;
122122
}

0 commit comments

Comments
 (0)