Simplify stream_less
This commit is contained in:
parent
816ad2102f
commit
c2434dfbbc
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue