Re: [PATCH 1/5] lib: string.c: Added a function strzcpy

2014-10-19 Thread Joe Perches
On Sun, 2014-10-19 at 14:19 +0200, Rickard Strandqvist wrote: > 2014-10-19 3:38 GMT+02:00 Joe Perches : > > On Sun, 2014-10-19 at 00:03 +0200, Rickard Strandqvist wrote: > >> Added a function strzcpy which works the same as strncpy, > >> but guaranteed to produce the trailing null character. > >> >

Re: [PATCH 1/5] lib: string.c: Added a function strzcpy

2014-10-19 Thread Rickard Strandqvist
2014-10-19 3:38 GMT+02:00 Joe Perches : > On Sun, 2014-10-19 at 00:03 +0200, Rickard Strandqvist wrote: >> Added a function strzcpy which works the same as strncpy, >> but guaranteed to produce the trailing null character. >> >> There are many places in the code where strncpy used although it >> mu

Re: [PATCH 1/5] lib: string.c: Added a function strzcpy

2014-10-18 Thread Joe Perches
On Sun, 2014-10-19 at 00:03 +0200, Rickard Strandqvist wrote: > Added a function strzcpy which works the same as strncpy, > but guaranteed to produce the trailing null character. > > There are many places in the code where strncpy used although it > must be zero terminated, and switching to strlcp