correct way to pass callbacks

From: Andrew Thompson <thompsa_at_freebsd.org>
Date: Sun, 25 Feb 2007 21:37:23 +1300
Hi,


The bridgestp module needs two callbacks from the bridge when it
attaches which so far I have just passed on with the function call.

bstp_attach(&sc->sc_stp, bridge_state_change, bridge_rtable_expire);

I have always felt this was rather ugly so have attached a patch to put
them both in a struct, is this the right way to do it?

bstp_attach(&sc->sc_stp, &cb);


cheers,
Andrew

Received on Sun Feb 25 2007 - 07:50:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:06 UTC