lkml.org 
[lkml]   [2014]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] lib: string.c: Added a funktion function strzcpy
On Sun,  5 Oct 2014 15:06:17 +0200 Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> 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 strlcpy is not an option
> because the string must nonetheless be fyld with zero characters.

As I mentioned last time, I think this patch would be better if it came
with follow-on patches which convert at least some of those callsites.
As it stands, this function has no callers and hence it won't get
tested. Plus those follow-on patches will demonstrate the value of
this patch and will provide example usages.


\
 
 \ /
  Last update: 2014-10-16 00:41    [W:2.133 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site