diff options
Diffstat (limited to 'net/dccp/ccids/lib/tfrc_equation.c')
-rw-r--r-- | net/dccp/ccids/lib/tfrc_equation.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c index 44076e0c659..2601012383f 100644 --- a/net/dccp/ccids/lib/tfrc_equation.c +++ b/net/dccp/ccids/lib/tfrc_equation.c | |||
@@ -13,9 +13,8 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | |||
17 | #include <asm/div64.h> | 16 | #include <asm/div64.h> |
18 | 17 | #include "../../dccp.h" | |
19 | #include "tfrc.h" | 18 | #include "tfrc.h" |
20 | 19 | ||
21 | #define TFRC_CALC_X_ARRSIZE 500 | 20 | #define TFRC_CALC_X_ARRSIZE 500 |
@@ -588,8 +587,10 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p) | |||
588 | /* p should be 0 unless there is a bug in my code */ | 587 | /* p should be 0 unless there is a bug in my code */ |
589 | index = 0; | 588 | index = 0; |
590 | 589 | ||
591 | if (R == 0) | 590 | if (R == 0) { |
591 | DCCP_WARN("RTT==0, setting to 1\n"); | ||
592 | R = 1; /* RTT can't be zero or else divide by zero */ | 592 | R = 1; /* RTT can't be zero or else divide by zero */ |
593 | } | ||
593 | 594 | ||
594 | BUG_ON(index >= TFRC_CALC_X_ARRSIZE); | 595 | BUG_ON(index >= TFRC_CALC_X_ARRSIZE); |
595 | 596 | ||