]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
[CCID3]: Remove redundant `len' test
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 20 Mar 2007 16:10:15 +0000 (13:10 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:47 +0000 (22:26 -0700)
Since CCID3 avoids  sending 0-byte data packets (cf. ccid3_hc_tx_send_packet),
testing for zero-payload length, as performed by ccid3_hc_tx_update_s, is
redundant - hence removed by this patch.

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

index 746f79d104b3557fdb5883d744fe287abde35fd5..4be62a9656639b1a88b4d9ad190d4f1223890248 100644 (file)
@@ -149,11 +149,8 @@ static void ccid3_hc_tx_update_x(struct sock *sk, struct timeval *now)
  */
 static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len)
 {
-       if (unlikely(len == 0))
-               ccid3_pr_debug("Packet payload length is 0 - not updating\n");
-       else
-               hctx->ccid3hctx_s = hctx->ccid3hctx_s == 0 ? len :
-                                   (9 * hctx->ccid3hctx_s + len) / 10;
+       hctx->ccid3hctx_s = hctx->ccid3hctx_s == 0 ? len :
+                           (9 * hctx->ccid3hctx_s + len) / 10;
        /*
         * Note: We could do a potential optimisation here - when `s' changes,
         *       recalculate sending rate and consequently t_ipi, t_delta, and