From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id B858AA0096
	for <public@inbox.dpdk.org>; Fri, 10 May 2019 17:28:52 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id F390829D2;
	Fri, 10 May 2019 17:28:51 +0200 (CEST)
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 7A6E6374
 for <dev@dpdk.org>; Fri, 10 May 2019 17:28:50 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga007.jf.intel.com ([10.7.209.58])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 10 May 2019 08:28:48 -0700
X-ExtLoop1: 1
Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.252.16.183])
 ([10.252.16.183])
 by orsmga007.jf.intel.com with ESMTP; 10 May 2019 08:28:47 -0700
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>
References: <20190510145312.409-1-msantana@redhat.com>
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Message-ID: <48b2d5ee-f6a6-9954-a45b-d2a581c5ace3@intel.com>
Date: Fri, 10 May 2019 16:28:46 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <20190510145312.409-1-msantana@redhat.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various
	files
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190510152846.KJCKYQhzqWkHFeGTitzBGEQJFhjfdAsFbWvzTHp7lYs@z>

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