From 0a5fcb9cf8e5c3fabaab1c20668f58fe85d7c70d Mon Sep 17 00:00:00 2001 From: "sebastian@breakpoint.cc" Date: Thu, 26 Jul 2007 23:21:32 +0200 Subject: sctp: move global declaration to header file. sctp_chunk_cachep & sctp_bucket_cachep is used module global, so move it to a header file. Signed-off-by: Sebastian Siewior Signed-off-by: Vlad Yasevich --- net/sctp/sm_make_chunk.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'net/sctp/sm_make_chunk.c') diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 8d18f57..ad02311 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -65,8 +65,6 @@ #include #include -extern struct kmem_cache *sctp_chunk_cachep; - SCTP_STATIC struct sctp_chunk *sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen); -- cgit v1.1 From c86dabcf00f3ca167df59f3526a53b3da3ede2c8 Mon Sep 17 00:00:00 2001 From: "sebastian@breakpoint.cc" Date: Thu, 26 Jul 2007 23:21:33 +0200 Subject: sctp: remove shadowed symbols Fixes the following sparse warnings: net/sctp/sm_make_chunk.c:1457:9: warning: symbol 'len' shadows an earlier one net/sctp/sm_make_chunk.c:1356:23: originally declared here net/sctp/socket.c:1534:22: warning: symbol 'chunk' shadows an earlier one net/sctp/socket.c:1387:20: originally declared here Signed-off-by: Sebastian Siewior Signed-off-by: Vlad Yasevich --- net/sctp/sm_make_chunk.c | 1 - 1 file changed, 1 deletion(-) (limited to 'net/sctp/sm_make_chunk.c') diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index ad02311..ba76cec 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -1452,7 +1452,6 @@ no_hmac: do_gettimeofday(&tv); if (!asoc && tv_lt(bear_cookie->expiration, tv)) { - __u16 len; /* * Section 3.3.10.3 Stale Cookie Error (3) * -- cgit v1.1 From 5f8f1c3c87e44f1bd0180cf19d0e7c83d062b4dc Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Thu, 2 Aug 2007 17:02:29 +0800 Subject: 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 --- net/sctp/sm_make_chunk.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'net/sctp/sm_make_chunk.c') diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index ba76cec..51c4d7f 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); } -- cgit v1.1