Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: rpc: fix dispatch() in svc_register()
To:
tech@openbsd.org
Date:
Thu, 6 Aug 2026 11:13:50 +0200

Download raw body.

Thread
On Thu, Aug 06, 2026 at 11:03:57AM +0200, Claudio Jeker wrote:
> On Thu, Aug 06, 2026 at 10:58:03AM +0200, Theo Buehler wrote:
> > The rpc/svc.h header declares svc_register() as follows:
> > 
> > extern bool_t   svc_register(SVCXPRT *, unsigned long, unsigned long,
> >                     void (*)(struct svc_req *, SVCXPRT *), int);
> > 
> > The diff below adjusts the function definition to match and does the
> > same with the sc_dispatch() member of struct svc_callout.
> > 
> > The rpc(3) documentation already says this further down:
> > 
> >                                 The procedure dispatch has the following
> >   form: int dispatch(struct svc_req *request, SVCXPRT *xprt) The

I missed the int return type here. I'll fix that to void on commit.

> >   svc_register() routine returns one if it succeeds, and zero otherwise.
> > 
> > All svc_register() callers (in C code or generated code) pass a function
> > pointer of the correct signature.
> > 
> > The diff does not change the generated assembly on aarch64 and silences
> > a -Wdeprecated-non-prototype warning.
> 
> Makes sense to me. OK claudio@

thanks.