Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Apr 2020 17:45:22 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, arch@freebsd.org, net@freebsd.org
Subject:   Re: additional ifreq accessors?
Message-ID:  <20200407174522.GC72584@spindle.one-eyed-alien.net>
In-Reply-To: <af189ac8-8120-8759-2f7b-f265ed3236ff@selasky.org>
References:  <20200407172151.GB72584@spindle.one-eyed-alien.net> <62336.1586280397@critter.freebsd.dk> <af189ac8-8120-8759-2f7b-f265ed3236ff@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--DIOMP1UsTsWJauNi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 07, 2020 at 07:32:37PM +0200, Hans Petter Selasky wrote:
> On 2020-04-07 19:26, Poul-Henning Kamp wrote:
> > --------
> > In message <20200407172151.GB72584@spindle.one-eyed-alien.net>, Brooks =
Davis writes:
> >=20
> >> My question for the lists is: should we adopt the
> >> more-technically-correct accessors in FreeBSD or stick with
> >> slightly-cheaper and more conventional aliasing approach[0]?
> >=20
> > The accessors buys us much more code-isolation, so that would be my vot=
e.
> >=20
>=20
> Is there a reason for using "void *" here?
>=20
> char *ifr_addr_get_data(void *ifrp);

Because the type is unknown at this point (it may be struct ifreq or
struct ifreq32 (or in CheriBSD struct ifreq64)).  By using "void *" here
we avoid the need to insert a wrong cast.

-- Brooks

--DIOMP1UsTsWJauNi
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJejLwxAAoJEKzQXbSebgfA6+8IAIYFrD81n/WNk0RSBzd1nxK3
TErSKOycIHe7/v6D7DUd0o9fSco7vIR7wLMbEmMkp/10ceNhD0/FlbSc1FTeqGL9
B7LiEH7pN9eKnuUqKZX/UbrAs2OAinxxNmvO4a0uQ/x72gp00Z0UqjYAM8gGCJl8
McqXdwEjY5VFFMdPywLC0SR1BiuExOghYHgpAAVa+P2mFYx+7AY+m2DsR0gJ4ZzE
qhcF6IpapYJ4yKzcz9vRz10C9v22fZngz49ibmHxe0u0plFqKd3B/RTiELcvvs4K
QeNd+GBjqj3djeipFHVo8YGv5kWpaq13Yl3ldXXFIkGc5ADaHoiSBD1PzeYFr1U=
=80lf
-----END PGP SIGNATURE-----

--DIOMP1UsTsWJauNi--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200407174522.GC72584>