aboutsummaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
authoryuan linyu2017-06-18 22:52:04 +0800
committerDavid S. Miller2017-06-20 13:30:15 -0400
commitb952f4dff2751252db073c27c0f8a16a416a2ddc (patch)
treefda132505741ee4d859ae09f45966656ea557572 /net/sctp
parentad941e693b24ad8b13c28382d323552ef6fb434b (diff)
net: manual clean code which call skb_put_[data:zero]
Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sm_make_chunk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 2c196b3e9cd3..4b1967997c16 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1474,11 +1474,10 @@ void sctp_chunk_put(struct sctp_chunk *ch)
void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data)
{
void *target;
- void *padding;
int chunklen = ntohs(chunk->chunk_hdr->length);
int padlen = SCTP_PAD4(chunklen) - chunklen;
- padding = skb_put_zero(chunk->skb, padlen);
+ skb_put_zero(chunk->skb, padlen);
target = skb_put_data(chunk->skb, data, len);
/* Adjust the chunk length field. */