Skip to content

Commit

Permalink
sctp: remove temporary variable confirm from sctp_packet_transmit
Browse files Browse the repository at this point in the history
Commit c86a773 ("sctp: add dst_pending_confirm flag") introduced
a temporary variable "confirm" in sctp_packet_transmit.

But it broke the rule that longer lines should be above shorter ones.
Besides, this variable is not necessary, so this patch is to just
remove it and use tp->dst_pending_confirm directly.

Fixes: c86a773 ("sctp: add dst_pending_confirm flag")
Signed-off-by: Xin Long <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lxin authored and davem330 committed Mar 22, 2017
1 parent 3dc857f commit 486a43d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/sctp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)
struct sctp_association *asoc = tp->asoc;
struct sctp_chunk *chunk, *tmp;
int pkt_count, gso = 0;
int confirm;
struct dst_entry *dst;
struct sk_buff *head;
struct sctphdr *sh;
Expand Down Expand Up @@ -625,13 +624,13 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)
asoc->peer.last_sent_to = tp;
}
head->ignore_df = packet->ipfragok;
confirm = tp->dst_pending_confirm;
if (confirm)
if (tp->dst_pending_confirm)
skb_set_dst_pending_confirm(head, 1);
/* neighbour should be confirmed on successful transmission or
* positive error
*/
if (tp->af_specific->sctp_xmit(head, tp) >= 0 && confirm)
if (tp->af_specific->sctp_xmit(head, tp) >= 0 &&
tp->dst_pending_confirm)
tp->dst_pending_confirm = 0;

out:
Expand Down

0 comments on commit 486a43d

Please sign in to comment.