aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/ulpevent.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-08-03 15:42:11 +0800
committerDavid S. Miller <davem@davemloft.net>2017-08-03 09:45:46 -0700
commitd8238d9dab8fbea22dd04f4e77639c7f7b83eef7 (patch)
tree7182858967d7ca84eb9a64ea951ee55befd8f7b1 /net/sctp/ulpevent.c
parentsctp: fix the name of struct sctp_shutdown_chunk_t (diff)
downloadlinux-dev-d8238d9dab8fbea22dd04f4e77639c7f7b83eef7.tar.xz
linux-dev-d8238d9dab8fbea22dd04f4e77639c7f7b83eef7.zip
sctp: remove the typedef sctp_errhdr_t
This patch is to remove the typedef sctp_errhdr_t, and replace with struct sctp_errhdr in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ulpevent.c')
-rw-r--r--net/sctp/ulpevent.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c
index 5f86c5062a98..67abc0194f30 100644
--- a/net/sctp/ulpevent.c
+++ b/net/sctp/ulpevent.c
@@ -371,19 +371,19 @@ sctp_ulpevent_make_remote_error(const struct sctp_association *asoc,
struct sctp_chunk *chunk, __u16 flags,
gfp_t gfp)
{
- struct sctp_ulpevent *event;
struct sctp_remote_error *sre;
+ struct sctp_ulpevent *event;
+ struct sctp_errhdr *ch;
struct sk_buff *skb;
- sctp_errhdr_t *ch;
__be16 cause;
int elen;
- ch = (sctp_errhdr_t *)(chunk->skb->data);
+ ch = (struct sctp_errhdr *)(chunk->skb->data);
cause = ch->cause;
- elen = SCTP_PAD4(ntohs(ch->length)) - sizeof(sctp_errhdr_t);
+ elen = SCTP_PAD4(ntohs(ch->length)) - sizeof(*ch);
/* Pull off the ERROR header. */
- skb_pull(chunk->skb, sizeof(sctp_errhdr_t));
+ skb_pull(chunk->skb, sizeof(*ch));
/* Copy the skb to a new skb with room for us to prepend
* notification with.