Simplify stream_less

This commit is contained in:
Tatsuhiro Tsujikawa 2019-03-04 23:28:27 +09:00
parent 816ad2102f
commit c2434dfbbc
1 changed files with 1 additions and 5 deletions

View File

@ -52,13 +52,9 @@ static int stream_less(const void *lhsx, const void *rhsx) {
return lhs->seq < rhs->seq; return lhs->seq < rhs->seq;
} }
if (lhs->cycle < rhs->cycle) {
return rhs->cycle - lhs->cycle <= NGHTTP2_MAX_CYCLE_DISTANCE; return rhs->cycle - lhs->cycle <= NGHTTP2_MAX_CYCLE_DISTANCE;
} }
return lhs->cycle - rhs->cycle > NGHTTP2_MAX_CYCLE_DISTANCE;
}
void nghttp2_stream_init(nghttp2_stream *stream, int32_t stream_id, void nghttp2_stream_init(nghttp2_stream *stream, int32_t stream_id,
uint8_t flags, nghttp2_stream_state initial_state, uint8_t flags, nghttp2_stream_state initial_state,
int32_t weight, int32_t remote_initial_window_size, int32_t weight, int32_t remote_initial_window_size,