[libnd-for-next PATCH] libnd: miscellaneous sparse fixes