提交 a38905e6 编写于 作者: X Xin Long 提交者: David S. Miller

sctp: remove the typedef sctp_ipv4addr_param_t

This patch is to remove the typedef sctp_ipv4addr_param_t, and replace
with struct sctp_ipv4addr_param in the places where it's using this
typedef.
Signed-off-by: NXin Long <lucien.xin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 aed20a53
...@@ -273,10 +273,10 @@ struct sctp_init_chunk { ...@@ -273,10 +273,10 @@ struct sctp_init_chunk {
/* Section 3.3.2.1. IPv4 Address Parameter (5) */ /* Section 3.3.2.1. IPv4 Address Parameter (5) */
typedef struct sctp_ipv4addr_param { struct sctp_ipv4addr_param {
struct sctp_paramhdr param_hdr; struct sctp_paramhdr param_hdr;
struct in_addr addr; struct in_addr addr;
} sctp_ipv4addr_param_t; };
/* Section 3.3.2.1. IPv6 Address Parameter (6) */ /* Section 3.3.2.1. IPv6 Address Parameter (6) */
typedef struct sctp_ipv6addr_param { typedef struct sctp_ipv6addr_param {
......
...@@ -292,7 +292,7 @@ static void sctp_v4_from_addr_param(union sctp_addr *addr, ...@@ -292,7 +292,7 @@ static void sctp_v4_from_addr_param(union sctp_addr *addr,
static int sctp_v4_to_addr_param(const union sctp_addr *addr, static int sctp_v4_to_addr_param(const union sctp_addr *addr,
union sctp_addr_param *param) union sctp_addr_param *param)
{ {
int length = sizeof(sctp_ipv4addr_param_t); int length = sizeof(struct sctp_ipv4addr_param);
param->v4.param_hdr.type = SCTP_PARAM_IPV4_ADDRESS; param->v4.param_hdr.type = SCTP_PARAM_IPV4_ADDRESS;
param->v4.param_hdr.length = htons(length); param->v4.param_hdr.length = htons(length);
......
...@@ -3153,7 +3153,7 @@ bool sctp_verify_asconf(const struct sctp_association *asoc, ...@@ -3153,7 +3153,7 @@ bool sctp_verify_asconf(const struct sctp_association *asoc,
case SCTP_PARAM_ERR_CAUSE: case SCTP_PARAM_ERR_CAUSE:
break; break;
case SCTP_PARAM_IPV4_ADDRESS: case SCTP_PARAM_IPV4_ADDRESS:
if (length != sizeof(sctp_ipv4addr_param_t)) if (length != sizeof(struct sctp_ipv4addr_param))
return false; return false;
/* ensure there is only one addr param and it's in the /* ensure there is only one addr param and it's in the
* beginning of addip_hdr params, or we reject it. * beginning of addip_hdr params, or we reject it.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册