From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peng Tao <bergwolf@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: lustre: lustre: libcfs: debug.c: Cleaning up unnecessary use of memset in conjunction with strncpy
Date: Mon, 15 Sep 2014 11:23:46 +0300 [thread overview]
Message-ID: <20140915082346.GB17875@mwanda> (raw)
In-Reply-To: <1410710597-14520-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Sun, Sep 14, 2014 at 06:03:16PM +0200, Rickard Strandqvist wrote:
> Using memset before strncpy just to ensure a trailing null
> character is an unnecessary double writing of a string
>
You really should make a function which pads and NUL terminates.
I've said this before, of course, but you haven't even tried.
I can't get excited about these cleanups which open code NUL termination
every where. They are risky and have introduced bugs before.
regards,
dan carpenter
next prev parent reply other threads:[~2014-09-15 8:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 16:03 [PATCH] staging: lustre: lustre: libcfs: debug.c: Cleaning up unnecessary use of memset in conjunction with strncpy Rickard Strandqvist
2014-09-15 8:23 ` Dan Carpenter [this message]
2014-09-17 22:12 ` Rickard Strandqvist
2014-09-18 8:51 ` Dan Carpenter
2014-09-18 19:57 ` Rickard Strandqvist
2014-09-18 22:39 ` Dan Carpenter
2014-10-14 21:34 ` 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=20140915082346.GB17875@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bergwolf@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.