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.gb72...@spindle.one-eyed-alien.net>, Brooks 
> > Davis writes:
> > 
> >> 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]?
> > 
> > The accessors buys us much more code-isolation, so that would be my vote.
> > 
> 
> Is there a reason for using "void *" here?
> 
> 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

Attachment: signature.asc
Description: PGP signature

Reply via email to