Subject: Re: CVS commit: src/sys/dev/pci
To: <>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 04/23/2006 16:39:21
On Tue, Apr 18, 2006 at 01:45:45AM +0000, Christos Zoulas wrote:
> In article <20060418012317.GA24657@mewburn.net>,
> Luke Mewburn  <lukem@NetBSD.org> 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