[CCID3]: Fix use of invalid loss intervals
authorIan McDonald <ian.mcdonald@jandi.co.nz>
Tue, 20 Mar 2007 17:46:52 +0000 (14:46 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:50 +0000 (22:26 -0700)
This fixes a bug which uses an invalid comparison.
The bug resulted in the use of invalid loss intervals.

Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ccids/lib/loss_interval.c

index 0a0baef16b3e02f22fc79f0849bc742e59a408d5..372d7e75cdd8bf953c1eea1a07b960949928a898 100644 (file)
@@ -91,7 +91,7 @@ u32 dccp_li_hist_calc_i_mean(struct list_head *list)
        u32 w_tot  = 0;
 
        list_for_each_entry_safe(li_entry, li_next, list, dccplih_node) {
-               if (li_entry->dccplih_interval != ~0) {
+               if (li_entry->dccplih_interval != ~0U) {
                        i_tot0 += li_entry->dccplih_interval * dccp_li_hist_w[i];
                        w_tot  += dccp_li_hist_w[i];
                        if (i != 0)