From: boris.brezillon@free-electrons•com (Boris BREZILLON)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] i2c: sun6-p2wi: fix call to snprintf
Date: Fri, 13 Jun 2014 12:09:15 +0200 [thread overview]
Message-ID: <539ACDCB.7010209@free-electrons.com> (raw)
In-Reply-To: <20140613095714.GP23430@n2100.arm.linux.org.uk>
On 13/06/2014 11:57, Russell King - ARM Linux wrote:
> On Fri, Jun 13, 2014 at 09:20:02AM +0200, Boris BREZILLON wrote:
>> - snprintf(p2wi->adapter.name, sizeof(p2wi->adapter.name), pdev->name);
>> + snprintf(p2wi->adapter.name, sizeof(p2wi->adapter.name), "%s",
>> + pdev->name);
> Isn't this just a complicated way to express:
>
> strlcpy(p2wi->adapter.name, pdev->name, sizeof(p2wi->adapter.name));
>
> ?
Yes it is. I'll make use of strlcpy instead.
Thanks,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
prev parent reply other threads:[~2014-06-13 10:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGXu5jLi5NXNsbUAn=XndDb2JSTxiVhMWbiMxtDsUOqZZhxf2A@mail.gmail.com>
2014-06-13 7:20 ` [PATCH] i2c: sun6-p2wi: fix call to snprintf Boris BREZILLON
2014-06-13 9:57 ` Russell King - ARM Linux
2014-06-13 10:09 ` Boris BREZILLON [this message]
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=539ACDCB.7010209@free-electrons.com \
--to=boris.brezillon@free-electrons$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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