From: Wei Yongjun Date: Thu, 2 Aug 2007 09:02:29 +0000 (+0800) Subject: SCTP: remove useless code in function sctp_init_cause X-Git-Tag: v2.6.23-rc2~9^2~2^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f8f1c3c87e44f1bd0180cf19d0e7c83d062b4dc;p=linux-2.6 SCTP: remove useless code in function sctp_init_cause Some code in function sctp_init_cause() seem useless, this patch remove them. Signed-off-by: Wei Yongjun Signed-off-by: Vlad Yasevich --- diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index ba76ceca2a..51c4d7fef1 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -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); }