Page MenuHomeFreeBSD

clnt_broadcast(3): fix eachresult argument type
ClosedPublic

Authored by brooks on Jan 29 2026, 12:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 15, 8:17 AM
Unknown Object (File)
Fri, May 15, 8:17 AM
Unknown Object (File)
Thu, May 14, 1:38 PM
Unknown Object (File)
Thu, May 14, 1:38 PM
Unknown Object (File)
Thu, May 14, 12:16 PM
Unknown Object (File)
Thu, May 14, 4:48 AM
Unknown Object (File)
Mon, May 11, 8:50 AM
Unknown Object (File)
Sun, May 10, 1:07 AM
Subscribers

Details

Summary

The eachresult argument is documented to take a function pointer of
type:

bool_t (*)(caddr_t, struct sockaddr_in *)

It was declared to take a resultproc_t which has historically been
declared to be:

bool_t (*resultproc_t)(caddr_t, ...);

This overlapped well enough for currently supported ABIs where variadic
arguments are passed in registers, but this declaration is misaligned
with the documentation (resultproc_t takes three arguments) and will be
fixed in a followup commit.

Fix the type to be non-variadic, matching callbacks, and define a
convenience type of as most callbacks take something other than a char *
as their first argument and need to be cast.

Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Question on naming. I would read "resultproc" as "result process". What does "resultprot" stands for?

Question on naming. I would read "resultproc" as "result process". What does "resultprot" stands for?

Sigh, typo. Will fix.

proc not prot in clnt_broadcast_resultproc_t

ngie added a subscriber: ngie.

This seems to me like a very reasonable change. Thank you!

This revision is now accepted and ready to land.Jan 30 2026, 4:53 PM