Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111242
b: refs/heads/master
c: eff253c
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker committed Aug 27, 2008
1 parent f896d13 commit f0515de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 157439fa4a9b38ac4ce41e2fc379fc5031affec8
refs/heads/master: eff253c4272cd2aac95ccff46d3d2e1a495f22b1
6 changes: 4 additions & 2 deletions trunk/net/dccp/ccids/lib/loss_interval.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ static void tfrc_lh_calc_i_mean(struct tfrc_loss_hist *lh)
u32 i_i, i_tot0 = 0, i_tot1 = 0, w_tot = 0;
int i, k = tfrc_lh_length(lh) - 1; /* k is as in rfc3448bis, 5.4 */

for (i=0; i <= k; i++) {
if (k <= 0)
return;

for (i = 0; i <= k; i++) {
i_i = tfrc_lh_get_interval(lh, i);

if (i < k) {
Expand All @@ -78,7 +81,6 @@ static void tfrc_lh_calc_i_mean(struct tfrc_loss_hist *lh)
i_tot1 += i_i * tfrc_lh_weights[i-1];
}

BUG_ON(w_tot == 0);
lh->i_mean = max(i_tot0, i_tot1) / w_tot;
}

Expand Down

0 comments on commit f0515de

Please sign in to comment.