]> err.no Git - linux-2.6/commitdiff
[CCID3] Calculate ccid3hcrx_x_recv using usecs_div
authorArnaldo Carvalho de Melo <acme@mandriva.com>
Fri, 9 Sep 2005 05:31:07 +0000 (02:31 -0300)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Fri, 9 Sep 2005 05:31:07 +0000 (02:31 -0300)
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/dccp/ccids/ccid3.c

index 37fd9eb8daaf894fe7d258df7a418f2dab002c29..63f897394a1e1be109b8bb22652793c0e4cbdfc2 100644 (file)
@@ -779,11 +779,8 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
        case TFRC_RSTATE_DATA: {
                const u32 delta = timeval_delta(&now,
                                        &hcrx->ccid3hcrx_tstamp_last_feedback);
-
-               hcrx->ccid3hcrx_x_recv = (hcrx->ccid3hcrx_bytes_recv *
-                                         USEC_PER_SEC);
-               if (likely(delta > 1))
-                       hcrx->ccid3hcrx_x_recv /= delta;
+               hcrx->ccid3hcrx_x_recv = usecs_div(hcrx->ccid3hcrx_bytes_recv,
+                                                  delta);
        }
                break;
        default: