All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH] mount: Add missing cast to getsockname
Date: Sun, 14 Apr 2019 19:08:38 -0700	[thread overview]
Message-ID: <20190415020838.924-1-rosenp@gmail.com> (raw)

Otherwise compilation can fail with incompatible pointer type.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/mount/network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/mount/network.c b/utils/mount/network.c
index fc21110..e166a82 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -1062,7 +1062,7 @@ int clnt_ping(struct sockaddr_in *saddr, const unsigned long prog,
 	if (caddr) {
 		/* Get the address of our end of this connection */
 		socklen_t len = sizeof(*caddr);
-		if (getsockname(sock, caddr, &len) != 0)
+		if (getsockname(sock, (struct sockaddr *) caddr, &len) != 0)
 			caddr->sin_family = 0;
 	}
 
-- 
2.17.1


             reply	other threads:[~2019-04-15  2:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  2:08 Rosen Penev [this message]
2019-04-16 18:28 ` [PATCH] mount: Add missing cast to getsockname Steve Dickson

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=20190415020838.924-1-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=linux-nfs@vger.kernel.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.