[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix use of sockaddr_in
From: |
Lars Ingebrigtsen |
Subject: |
Re: [PATCH] Fix use of sockaddr_in |
Date: |
Sun, 14 May 2017 12:28:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Philipp Stephani <address@hidden> writes:
> + case AF_INET:
> + port = ((struct sockaddr_in6 *) (struct sockaddr *)
> &sa1)->sin6_port;
> + has_port = true;
> + break;
> + case AF_INET6:
> + port = ((struct sockaddr_in *) (struct sockaddr *)
> &sa1)->sin_port;
> + has_port = true;
Aren't these two cases in reverse? If it's AF_INET6, it's an in6
struct, not the other way around.
Not that it matters, since (as Eli said) the sizes of the first elements
in the structs are identical...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: [PATCH] Fix use of sockaddr_in, (continued)
- Re: [PATCH] Fix use of sockaddr_in, Andreas Schwab, 2017/05/13
- Re: [PATCH] Fix use of sockaddr_in, Eli Zaretskii, 2017/05/13
- Re: [PATCH] Fix use of sockaddr_in, Andreas Schwab, 2017/05/14
- Re: [PATCH] Fix use of sockaddr_in, Eli Zaretskii, 2017/05/14
- Re: [PATCH] Fix use of sockaddr_in, Paul Eggert, 2017/05/15
- Re: [PATCH] Fix use of sockaddr_in, Philipp Stephani, 2017/05/15
- Re: [PATCH] Fix use of sockaddr_in, Paul Eggert, 2017/05/17
- Re: [PATCH] Fix use of sockaddr_in, Philipp Stephani, 2017/05/27
- Re: [PATCH] Fix use of sockaddr_in, Eli Zaretskii, 2017/05/17
- Re: [PATCH] Fix use of sockaddr_in, Paul Eggert, 2017/05/17
- Re: [PATCH] Fix use of sockaddr_in,
Lars Ingebrigtsen <=
- Re: [PATCH] Fix use of sockaddr_in, Philipp Stephani, 2017/05/14