On Fri, 09 Oct 2009 16:23:47 -0400 "Anurag S. Maskey" <Anurag.Maskey at Sun.COM> wrote:
> Michael Hunter wrote: > > On Fri, 09 Oct 2009 15:45:14 -0400 > > "Anurag S. Maskey" <Anurag.Maskey at Sun.COM> wrote: > > > >> code review requested for > >> > >> 11834 IPv6 only NCUs don't go online > >> http://defect.opensolaris.org/bz/show_bug.cgi?id=11834 > >> > >> webrev at > >> > >> http://zhadum.east/export/ws/am223141/checkout-area/nwam1-fixes/webrev/ > >> > > I don't think it is suppose to be +1. strcspn("a:",":") == 1. > > > The snippet at events.c:nwamd_event_init_if_state() has the same +1, so > took me a while to figure out what was going on. The +1 is for > strlcpy() which copies dstsize-1 characters. Duh, of course. So really you are saying strlcpy(linkname, name, min(sizeof(linkname),strcspin()+1) but you know that strcpsin() << sizeof(linkname). Okay. mph > > Anurag >
