Commit a05437ac authored by Xin Long's avatar Xin Long Committed by David S. Miller

sctp: remove the typedef sctp_cmsgs_t

This patch is to remove the typedef sctp_cmsgs_t, and
replace with struct sctp_cmsgs in the places where it's
using this typedef.
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 74439f34
...@@ -1985,11 +1985,11 @@ int sctp_cmp_addr_exact(const union sctp_addr *ss1, ...@@ -1985,11 +1985,11 @@ int sctp_cmp_addr_exact(const union sctp_addr *ss1,
struct sctp_chunk *sctp_get_ecne_prepend(struct sctp_association *asoc); struct sctp_chunk *sctp_get_ecne_prepend(struct sctp_association *asoc);
/* A convenience structure to parse out SCTP specific CMSGs. */ /* A convenience structure to parse out SCTP specific CMSGs. */
typedef struct sctp_cmsgs { struct sctp_cmsgs {
struct sctp_initmsg *init; struct sctp_initmsg *init;
struct sctp_sndrcvinfo *srinfo; struct sctp_sndrcvinfo *srinfo;
struct sctp_sndinfo *sinfo; struct sctp_sndinfo *sinfo;
} sctp_cmsgs_t; };
/* Structure for tracking memory objects */ /* Structure for tracking memory objects */
typedef struct { typedef struct {
......
...@@ -1593,7 +1593,8 @@ static int sctp_error(struct sock *sk, int flags, int err) ...@@ -1593,7 +1593,8 @@ static int sctp_error(struct sock *sk, int flags, int err)
*/ */
/* BUG: We do not implement the equivalent of sk_stream_wait_memory(). */ /* BUG: We do not implement the equivalent of sk_stream_wait_memory(). */
static int sctp_msghdr_parse(const struct msghdr *, sctp_cmsgs_t *); static int sctp_msghdr_parse(const struct msghdr *msg,
struct sctp_cmsgs *cmsgs);
static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
{ {
...@@ -1609,7 +1610,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) ...@@ -1609,7 +1610,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
struct sctp_sndrcvinfo *sinfo; struct sctp_sndrcvinfo *sinfo;
struct sctp_initmsg *sinit; struct sctp_initmsg *sinit;
sctp_assoc_t associd = 0; sctp_assoc_t associd = 0;
sctp_cmsgs_t cmsgs = { NULL }; struct sctp_cmsgs cmsgs = { NULL };
enum sctp_scope scope; enum sctp_scope scope;
bool fill_sinfo_ttl = false, wait_connect = false; bool fill_sinfo_ttl = false, wait_connect = false;
struct sctp_datamsg *datamsg; struct sctp_datamsg *datamsg;
...@@ -7445,10 +7446,10 @@ static int sctp_autobind(struct sock *sk) ...@@ -7445,10 +7446,10 @@ static int sctp_autobind(struct sock *sk)
* msg_control * msg_control
* points here * points here
*/ */
static int sctp_msghdr_parse(const struct msghdr *msg, sctp_cmsgs_t *cmsgs) static int sctp_msghdr_parse(const struct msghdr *msg, struct sctp_cmsgs *cmsgs)
{ {
struct cmsghdr *cmsg;
struct msghdr *my_msg = (struct msghdr *)msg; struct msghdr *my_msg = (struct msghdr *)msg;
struct cmsghdr *cmsg;
for_each_cmsghdr(cmsg, my_msg) { for_each_cmsghdr(cmsg, my_msg) {
if (!CMSG_OK(my_msg, cmsg)) if (!CMSG_OK(my_msg, cmsg))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment