Commit 353b13e1 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

[CCID3]: Remove redundant `len' test

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: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8d13bf9a
...@@ -149,9 +149,6 @@ static void ccid3_hc_tx_update_x(struct sock *sk, struct timeval *now) ...@@ -149,9 +149,6 @@ 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) 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 : hctx->ccid3hctx_s = hctx->ccid3hctx_s == 0 ? len :
(9 * hctx->ccid3hctx_s + len) / 10; (9 * hctx->ccid3hctx_s + len) / 10;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment