diff options
Diffstat (limited to '')
-rw-r--r-- | tests/failmalloc_test.c | 2 | ||||
-rw-r--r-- | tests/nghttp2_session_test.c | 10 | ||||
-rw-r--r-- | tests/nghttp2_test_helper.c | 14 |
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/failmalloc_test.c b/tests/failmalloc_test.c index 5b204fe..e68ac11 100644 --- a/tests/failmalloc_test.c +++ b/tests/failmalloc_test.c @@ -88,7 +88,7 @@ static nghttp2_ssize data_feed_recv_callback(nghttp2_session *session, int flags, void *user_data) { data_feed *df = ((my_user_data *)user_data)->df; size_t avail = (size_t)(df->datalimit - df->datamark); - size_t wlen = nghttp2_min(avail, len); + size_t wlen = nghttp2_min_size(avail, len); (void)session; (void)flags; diff --git a/tests/nghttp2_session_test.c b/tests/nghttp2_session_test.c index bb505c2..14b1e4b 100644 --- a/tests/nghttp2_session_test.c +++ b/tests/nghttp2_session_test.c @@ -463,8 +463,8 @@ static nghttp2_ssize select_padding_callback(nghttp2_session *session, my_user_data *ud = (my_user_data *)user_data; (void)session; - return (nghttp2_ssize)nghttp2_min(max_payloadlen, - frame->hd.length + ud->padlen); + return (nghttp2_ssize)nghttp2_min_size(max_payloadlen, + frame->hd.length + ud->padlen); } static nghttp2_ssize too_large_data_source_length_callback( @@ -5523,8 +5523,8 @@ void test_nghttp2_submit_data_read_length_too_large(void) { buf = &framebufs->head->buf; nghttp2_frame_unpack_frame_hd(&hd, buf->pos); - payloadlen = nghttp2_min(NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE, - NGHTTP2_INITIAL_WINDOW_SIZE); + payloadlen = nghttp2_min_size(NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE, + NGHTTP2_INITIAL_WINDOW_SIZE); assert_size(NGHTTP2_FRAME_HDLEN + 1 + payloadlen, ==, (size_t)nghttp2_buf_cap(buf)); @@ -5590,7 +5590,7 @@ static nghttp2_ssize submit_data_twice_data_source_read_callback( (void)user_data; *data_flags |= NGHTTP2_DATA_FLAG_EOF; - return (nghttp2_ssize)nghttp2_min(len, 16); + return (nghttp2_ssize)nghttp2_min_size(len, 16); } static int submit_data_twice_on_frame_send_callback(nghttp2_session *session, diff --git a/tests/nghttp2_test_helper.c b/tests/nghttp2_test_helper.c index c1b912b..2e2562d 100644 --- a/tests/nghttp2_test_helper.c +++ b/tests/nghttp2_test_helper.c @@ -174,7 +174,7 @@ nghttp2_ssize inflate_hd(nghttp2_hd_inflater *inflater, nva_out *out, if (offset) { size_t n; - n = nghttp2_min(offset, nghttp2_buf_len(&bp)); + n = nghttp2_min_size(offset, nghttp2_buf_len(&bp)); bp.pos += n; offset -= n; } @@ -343,9 +343,9 @@ nghttp2_stream *open_sent_stream3(nghttp2_session *session, int32_t stream_id, stream = nghttp2_session_open_stream(session, stream_id, flags, pri_spec_in, initial_state, stream_user_data); session->last_sent_stream_id = - nghttp2_max(session->last_sent_stream_id, stream_id); + nghttp2_max_int32(session->last_sent_stream_id, stream_id); session->next_stream_id = - nghttp2_max(session->next_stream_id, (uint32_t)stream_id + 2); + nghttp2_max_uint32(session->next_stream_id, (uint32_t)stream_id + 2); return stream; } @@ -368,9 +368,9 @@ nghttp2_stream *open_sent_stream_with_dep_weight(nghttp2_session *session, stream = open_stream_with_all(session, stream_id, weight, 0, dep_stream); session->last_sent_stream_id = - nghttp2_max(session->last_sent_stream_id, stream_id); + nghttp2_max_int32(session->last_sent_stream_id, stream_id); session->next_stream_id = - nghttp2_max(session->next_stream_id, (uint32_t)stream_id + 2); + nghttp2_max_uint32(session->next_stream_id, (uint32_t)stream_id + 2); return stream; } @@ -404,7 +404,7 @@ nghttp2_stream *open_recv_stream3(nghttp2_session *session, int32_t stream_id, stream = nghttp2_session_open_stream(session, stream_id, flags, pri_spec_in, initial_state, stream_user_data); session->last_recv_stream_id = - nghttp2_max(session->last_recv_stream_id, stream_id); + nghttp2_max_int32(session->last_recv_stream_id, stream_id); return stream; } @@ -427,7 +427,7 @@ nghttp2_stream *open_recv_stream_with_dep_weight(nghttp2_session *session, stream = open_stream_with_all(session, stream_id, weight, 0, dep_stream); session->last_recv_stream_id = - nghttp2_max(session->last_recv_stream_id, stream_id); + nghttp2_max_int32(session->last_recv_stream_id, stream_id); return stream; } |