mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Grant Likely <grant.likely@linaro.org>,
	Andi Kleen <ak@linux.intel.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] lib: string.c:  Added a funktion function strzcpy
Date: Wed, 15 Oct 2014 15:15:11 -0700	[thread overview]
Message-ID: <20141015151511.ea81b39adcee0954518bf5f3@linux-foundation.org> (raw)
In-Reply-To: <1412514377-19387-2-git-send-email-rickard_strandqvist@spectrumdigital.se>

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.

  reply	other threads:[~2014-10-15 22:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-05 13:06 Rickard Strandqvist
2014-10-05 13:06 ` Rickard Strandqvist
2014-10-15 22:15   ` Andrew Morton [this message]
2014-10-16 21:09     ` Rickard Strandqvist
2014-10-16 21:17       ` Andrew Morton
2014-10-16 21:28         ` Rickard Strandqvist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141015151511.ea81b39adcee0954518bf5f3@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ak@linux.intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rickard_strandqvist@spectrumdigital.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®