From: Boris BREZILLON <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: Kees Cook <keescook-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Shuge <shuge-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org>,
Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Fengguang Wu
<fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
kevin-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [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-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
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
WARNING: multiple messages have this Message-ID (diff)
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
next prev parent reply other threads:[~2014-06-13 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGXu5jLi5NXNsbUAn=XndDb2JSTxiVhMWbiMxtDsUOqZZhxf2A@mail.gmail.com>
[not found] ` <CAGXu5jLi5NXNsbUAn=XndDb2JSTxiVhMWbiMxtDsUOqZZhxf2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-13 7:20 ` [PATCH] i2c: sun6-p2wi: fix call to snprintf Boris BREZILLON
2014-06-13 7:20 ` Boris BREZILLON
[not found] ` <1402644002-2591-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-06-13 9:57 ` Russell King - ARM Linux
2014-06-13 9:57 ` Russell King - ARM Linux
[not found] ` <20140613095714.GP23430-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-06-13 10:09 ` Boris BREZILLON [this message]
2014-06-13 10:09 ` Boris BREZILLON
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-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
--cc=fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=keescook-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=kevin-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=shuge-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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.