Commit 9ae3df72 authored by Sridhar Samudrala's avatar Sridhar Samudrala

[SCTP] Change sctp_assoc_t to a sized type(s32).

Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
parent 31a37910
......@@ -335,7 +335,7 @@ static inline void sctp_v6_exit(void) { return; }
/* Map an association to an assoc_id. */
static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc)
{
return (asoc?asoc->assoc_id:NULL);
return (asoc?asoc->assoc_id:0);
}
/* Look up the association by its id. */
......
......@@ -55,7 +55,7 @@
#include <linux/types.h>
#include <linux/socket.h>
typedef void * sctp_assoc_t;
typedef __s32 sctp_assoc_t;
/* The following symbols come from the Sockets API Extensions for
* SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
......
......@@ -271,7 +271,7 @@ struct sctp_association *sctp_association_init(struct sctp_association *asoc,
asoc->need_ecne = 0;
asoc->assoc_id = (sctp_assoc_t)-1L;
asoc->assoc_id = 0;
/* Assume that peer would support both address types unless we are
* told otherwise.
......@@ -374,9 +374,9 @@ static void sctp_association_destroy(struct sctp_association *asoc)
sctp_endpoint_put(asoc->ep);
sock_put(asoc->base.sk);
if ((long)asoc->assoc_id != -1L) {
if (asoc->assoc_id != 0) {
spin_lock_bh(&sctp_assocs_id_lock);
idr_remove(&sctp_assocs_id, (long)asoc->assoc_id);
idr_remove(&sctp_assocs_id, asoc->assoc_id);
spin_unlock_bh(&sctp_assocs_id_lock);
}
......
......@@ -1063,7 +1063,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
struct sctp_sndrcvinfo default_sinfo = { 0 };
struct sctp_sndrcvinfo *sinfo;
struct sctp_initmsg *sinit;
sctp_assoc_t associd = NULL;
sctp_assoc_t associd = 0;
sctp_cmsgs_t cmsgs = { NULL };
int err;
sctp_scope_t scope;
......
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