]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
SCTP: remove useless code in function sctp_init_cause
authorWei Yongjun <yjwei@cn.fujitsu.com>
Thu, 2 Aug 2007 09:02:29 +0000 (17:02 +0800)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Thu, 2 Aug 2007 14:56:07 +0000 (10:56 -0400)
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>
net/sctp/sm_make_chunk.c

index ba76ceca2a4e01c5f55eeb517e7bd2f8386dd27a..51c4d7fef1d23137c29fd30aabdeb261ae1e9d86 100644 (file)
@@ -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);
 }