rtnl_link_vlan API

Justin Mayfield jmayfield at cradlepoint.com
Wed May 9 20:00:38 EDT 2012


I noticed that many of the rtnl_link_vlan_XYZ calls use the macro 
"IS_VLAN_LINK_ASSERT".  Often this is in a function that claims to 
return < 0 if there is an error.  This is only true if the application 
is compiled with NDEBUG because APPBUG does an assert() and thus abort().

I can guard my code to prevent these API calls from being made on the 
wrong link type, but this feels redundant if the rtnl_link_vlan_XYZ 
calls are doing the same check too.  I'd prefer that the 
IS_VLAN_LINK_ASSERT macro be a _CHECK and simply return a negative error 
code which I can parse, as I do for much of the other link API.

I can submit a patch to this effect if deemed worthy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120509/25a6d18f/attachment.html>


More information about the libnl mailing list