Commit 43b36408 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Slight code cleanup

parent 708eb2a2
...@@ -202,10 +202,10 @@ static void stream_update_dep_effective_weight(nghttp2_stream *stream) { ...@@ -202,10 +202,10 @@ static void stream_update_dep_effective_weight(nghttp2_stream *stream) {
if (si->dpri != NGHTTP2_STREAM_DPRI_REST) { if (si->dpri != NGHTTP2_STREAM_DPRI_REST) {
si->effective_weight = si->effective_weight =
nghttp2_stream_dep_distributed_effective_weight(stream, si->weight); nghttp2_stream_dep_distributed_effective_weight(stream, si->weight);
}
stream_update_dep_effective_weight(si); stream_update_dep_effective_weight(si);
} }
}
} }
static void stream_update_dep_set_rest(nghttp2_stream *stream) { static void stream_update_dep_set_rest(nghttp2_stream *stream) {
...@@ -311,7 +311,6 @@ static int stream_update_dep_queue_top(nghttp2_stream *stream, ...@@ -311,7 +311,6 @@ static int stream_update_dep_queue_top(nghttp2_stream *stream,
*/ */
static int stream_update_dep_sum_norest_weight(nghttp2_stream *stream) { static int stream_update_dep_sum_norest_weight(nghttp2_stream *stream) {
nghttp2_stream *si; nghttp2_stream *si;
int rv;
stream->sum_norest_weight = 0; stream->sum_norest_weight = 0;
...@@ -323,17 +322,14 @@ static int stream_update_dep_sum_norest_weight(nghttp2_stream *stream) { ...@@ -323,17 +322,14 @@ static int stream_update_dep_sum_norest_weight(nghttp2_stream *stream) {
return 0; return 0;
} }
rv = 0;
for (si = stream->dep_next; si; si = si->sib_next) { for (si = stream->dep_next; si; si = si->sib_next) {
if (stream_update_dep_sum_norest_weight(si)) { if (stream_update_dep_sum_norest_weight(si)) {
rv = 1;
stream->sum_norest_weight += si->weight; stream->sum_norest_weight += si->weight;
} }
} }
return rv; return stream->sum_norest_weight > 0;
} }
static int stream_update_dep_on_attach_item(nghttp2_stream *stream, static int stream_update_dep_on_attach_item(nghttp2_stream *stream,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment