* [PATCH] mount: Add missing cast to getsockname
@ 2019-04-15 2:08 Rosen Penev
2019-04-16 18:28 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2019-04-15 2:08 UTC (permalink / raw)
To: linux-nfs
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mount: Add missing cast to getsockname
2019-04-15 2:08 [PATCH] mount: Add missing cast to getsockname Rosen Penev
@ 2019-04-16 18:28 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2019-04-16 18:28 UTC (permalink / raw)
To: Rosen Penev, linux-nfs
On 4/14/19 10:08 PM, Rosen Penev wrote:
> Otherwise compilation can fail with incompatible pointer type.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Committed....
steved.
> ---
> 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;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-16 18:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-15 2:08 [PATCH] mount: Add missing cast to getsockname Rosen Penev
2019-04-16 18:28 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).