[ovs-dev] [lacp 1/3] vswitchd: Modularize LACP.

Ben Pfaff blp at nicira.com
Fri Mar 18 18:20:53 UTC 2011


On Fri, Mar 18, 2011 at 11:17:50AM -0700, Ethan Jackson wrote:
> > In lacp.h, the 'slave' parameter to lacp_send_pdu() is declared as
> > "const const". ?But I don't think that even one "const" should really
> > be there, because the one function that implements this interface
> > casts it away immediately. ?(If you remove the const, you can remove
> > that cast.)
> 
> I need the const so I can call it with the 'aux' parameter of slave
> which is a const void *.  Either way I'm going to need a cast
> somewhere, in lacp.c or in the callback function.  I don't really have
> a stylistic preference.  Do you still think it's better to change the
> prototype?  I'm slightly inclined to leave it.

Why is the 'aux' member a const void *?  I'd be inclined to just drop
the const there too.  But if you disagree then just fix the doubled
"const const" and call it good.

Thanks,

Ben.



More information about the dev mailing list