Skip to content

Commit

Permalink
SCTP: remove useless code in function sctp_init_cause
Browse files Browse the repository at this point in the history
Some code in function sctp_init_cause() seem useless, this patch remove
them.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
  • Loading branch information
Wei Yongjun authored and Vlad Yasevich committed Aug 2, 2007
1 parent aecedea commit 5f8f1c3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/sctp/sm_make_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,12 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
const void *payload, size_t paylen)
{
sctp_errhdr_t err;
int padlen;
__u16 len;

/* Cause code constants are now defined in network order. */
err.cause = cause_code;
len = sizeof(sctp_errhdr_t) + paylen;
padlen = len % 4;
err.length = htons(len);
len += padlen;
chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err);
sctp_addto_chunk(chunk, paylen, payload);
}
Expand Down

0 comments on commit 5f8f1c3

Please sign in to comment.