Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/pci



On Tue, Apr 18, 2006 at 01:45:45AM +0000, Christos Zoulas wrote:
> In article <20060418012317.GA24657%mewburn.net@localhost>,
> Luke Mewburn  <lukem%NetBSD.org@localhost> wrote:
> 
> >IMHO, strncpy() should only be used when copying to a destination
> >where the API for that destination doesn't need a NUL termination,
> >such as the disklabel(5) type & pack fields, or utmp(5) fields.
> 
> Or when you want to make sure that you zero out the whole remaining
> buffer.

And, indeed, not to use it when you don't want the cost of zeroing
out the rest of the buffer.

        David

-- 
David Laight: david%l8s.co.uk@localhost



Home | Main Index | Thread Index | Old Index