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>
This commit is contained in:
committed by
David S. Miller
parent
ac23e68133
commit
d8238d9dab
@@ -479,13 +479,13 @@ for (pos.v = chunk->member;\
|
||||
_sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length))
|
||||
|
||||
#define _sctp_walk_errors(err, chunk_hdr, end)\
|
||||
for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \
|
||||
for (err = (struct sctp_errhdr *)((void *)chunk_hdr + \
|
||||
sizeof(struct sctp_chunkhdr));\
|
||||
((void *)err + offsetof(sctp_errhdr_t, length) + sizeof(err->length) <=\
|
||||
((void *)err + offsetof(struct sctp_errhdr, length) + sizeof(err->length) <=\
|
||||
(void *)chunk_hdr + end) &&\
|
||||
(void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\
|
||||
ntohs(err->length) >= sizeof(sctp_errhdr_t); \
|
||||
err = (sctp_errhdr_t *)((void *)err + SCTP_PAD4(ntohs(err->length))))
|
||||
ntohs(err->length) >= sizeof(struct sctp_errhdr); \
|
||||
err = (struct sctp_errhdr *)((void *)err + SCTP_PAD4(ntohs(err->length))))
|
||||
|
||||
#define sctp_walk_fwdtsn(pos, chunk)\
|
||||
_sctp_walk_fwdtsn((pos), (chunk), ntohs((chunk)->chunk_hdr->length) - sizeof(struct sctp_fwdtsn_chunk))
|
||||
|
||||
Reference in New Issue
Block a user