Skip to content

Commit

Permalink
[CCID2]: Remove redundant case block
Browse files Browse the repository at this point in the history
skb's passed to ccid2_hc_tx_send_packet() are headerless, the packet
type is decided later, in dccp_write_xmit(). Therefore the first test
of the switch/case block is always true, the others are never reached.

Signed-off-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>
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Oct 10, 2007
1 parent ee196c2 commit 6c58324
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,7 @@ static int ccid2_hc_tx_alloc_seq(struct ccid2_hc_tx_sock *hctx)

static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
{
struct ccid2_hc_tx_sock *hctx;

switch (DCCP_SKB_CB(skb)->dccpd_type) {
case 0: /* XXX data packets from userland come through like this */
case DCCP_PKT_DATA:
case DCCP_PKT_DATAACK:
break;
/* No congestion control on other packets */
default:
return 0;
}

hctx = ccid2_hc_tx_sk(sk);
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);

ccid2_pr_debug("pipe=%d cwnd=%d\n", hctx->ccid2hctx_pipe,
hctx->ccid2hctx_cwnd);
Expand Down

0 comments on commit 6c58324

Please sign in to comment.