From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma
(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] librdmacm/preload.c: Eliminate some compile warnings
Date: Thu, 12 Jul 2012 10:35:41 -0400 [thread overview]
Message-ID: <4FFEE0BD.3010504@dev.mellanox.co.il> (raw)
by fixing a couple of typecasts
src/preload.c: In function ?bind?:
src/preload.c:350: warning: assignment from incompatible pointer type
src/preload.c: In function ?connect?:
src/preload.c:397: warning: assignment from incompatible pointer type
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/preload.c b/src/preload.c
index 8758d5c..2750b30 100644
--- a/src/preload.c
+++ b/src/preload.c
@@ -347,7 +347,7 @@ int bind(int socket, const struct sockaddr *addr, socklen_t addrlen)
int fd, ret;
if (fd_get(socket, &fd) == fd_rsocket) {
- sin = (struct sockaddr_sin *) addr;
+ sin = (struct sockaddr_in *) addr;
if (!sin->sin_port || ntohs(sin->sin_port) > 1024)
return rbind(fd, addr, addrlen);
@@ -394,7 +394,7 @@ int connect(int socket, const struct sockaddr *addr, socklen_t addrlen)
int fd, ret;
if (fd_get(socket, &fd) == fd_rsocket) {
- sin = (struct sockaddr_sin *) addr;
+ sin = (struct sockaddr_in *) addr;
if (ntohs(sin->sin_port) > 1024) {
ret = rconnect(fd, addr, addrlen);
if (!ret || errno == EINPROGRESS)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2012-07-12 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 14:35 Hal Rosenstock [this message]
[not found] ` <4FFEE0BD.3010504-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-07-12 16:25 ` [PATCH] librdmacm/preload.c: Eliminate some compile warnings Hefty, Sean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FFEE0BD.3010504@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.