DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Michael Santana <msantana@redhat.com>, dev@dpdk.org
Cc: Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	Matan Azrad <matan@mellanox.com>,
	Byron Marohn <byron.marohn@intel.com>,
	Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>,
	Aaron Conole <aconole@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files
Date: Fri, 10 May 2019 16:28:46 +0100	[thread overview]
Message-ID: <48b2d5ee-f6a6-9954-a45b-d2a581c5ace3@intel.com> (raw)
Message-ID: <20190510152846.KJCKYQhzqWkHFeGTitzBGEQJFhjfdAsFbWvzTHp7lYs@z> (raw)
In-Reply-To: <20190510145312.409-1-msantana@redhat.com>

On 10-May-19 3:53 PM, Michael Santana wrote:
> snprintf guarantees to always correctly place a null terminator in the buffer
> string. So manually placing a null terminator in a buffer right after a call
> to snprintf is redundant code.
> 
> Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as this
> means we are not using the last character in the buffer. 'sizeof(buffer)' is
> enough.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michael Santana <msantana@redhat.com>
> ---

LGTM

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

  parent reply	other threads:[~2019-05-10 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 14:53 Michael Santana
2019-05-10 14:53 ` Michael Santana
2019-05-10 14:55 ` Bruce Richardson
2019-05-10 14:55   ` Bruce Richardson
2019-05-29 10:51   ` Thomas Monjalon
2019-05-10 15:28 ` Burakov, Anatoly [this message]
2019-05-10 15:28   ` Burakov, Anatoly
2019-05-28 13:33   ` Michael Santana Francisco

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=48b2d5ee-f6a6-9954-a45b-d2a581c5ace3@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=aconole@redhat.com \
    --cc=byron.marohn@intel.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=msantana@redhat.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=rmody@marvell.com \
    --cc=shshaikh@marvell.com \
    /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;
as well as URLs for NNTP newsgroup(s).