[Unbound-users] [PATCH] support for remote control over local sockets
des at des.no
Mon Jan 12 09:19:14 UTC 2015
"W.C.A. Wijngaards" <wouter at nlnetlabs.nl> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > I believe the cast should be to socklen_t, not sa_family_t.
> OK, done.
Wow, that was quick. I'm actually not 100% sure this is correct either:
sun_len (not in POSIX) is char while socklen_t is required by POSIX to
be 32 bits. But it's no less wrong than the original, since on systems
where sockaddrs have a length field, it is used to pass around the same
values that POSIX uses socklen_t for.
In any case, the cast is not really necessary. There are many needless
casts in unbound, which I assume are the result of running a simplistic
lint on the code and trying to fix everything it flags instead of tuning
it to reduce false positives.
Dag-Erling Smørgrav - des at des.no
More information about the Unbound-users