On Thu, 19 Nov 2009 13:46:57 -0500 "Anurag S. Maskey" <Anurag.Maskey at Sun.COM> wrote:
> > > Michael Hunter wrote: > >> http://zhadum.east/export/ws/am223141/temp/nwam1-work/webrev/ > >> > >> 10341 nwamadm should use the ofmt API to print the output of "list" > >> http://defect.opensolaris.org/bz/show_bug.cgi?id=10341 > >> > >> comments appreciated. > >> > > > > nwamadm.c:661,666,673 Thats heavy machinery for copying a string > > > I am sorry, I do not quite understand. The string to print must be > placed in buf. The profile_entry_t struct stores the actual values > rather than strings. I could change the profile_entry_t struct to store > the actual string, but that is just moving the nwam_*_to_string() calls > somewhere else. Its just a little heavy to use a the printf interpretive language to copy memory. sprintf(buffer, "%s", str) <==> strlcpy(buffer, str, sizeof (buffer)) Michael
