From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C06B9A0465 for ; Wed, 29 May 2019 12:51:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A2D14CA6; Wed, 29 May 2019 12:51:24 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id F1B30378B for ; Wed, 29 May 2019 12:51:22 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 450A321F1E; Wed, 29 May 2019 06:51:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 29 May 2019 06:51:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=yMwAyZe+cEX5XErQ/FpwEOsY5+yVOq1v1tJD9/fTD8U=; b=FI7AvWs5bEzl Y2CCmobVRoEnPrkziJvpm9YU9e94BDKpjIdiUAbqn2i6e5ESQkCLJQWqVI1t46rD 4NmAiXcJCrob5Rdqlzrz9/1Ur7GsjgXnRiz5ixo5ohCA7KUGZQQAcsJIcVjBd+Yt KRDnWq0eiunV8RwtY81WYT/m/gi15yA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=yMwAyZe+cEX5XErQ/FpwEOsY5+yVOq1v1tJD9/fTD 8U=; b=I7ppozhpEwDQ6s6JwcDji7tMlaorbYz7WqVsrWSOaUoDl5hkTdoavllvt IDQ13ILP6JZmOp8u+pV/OaU2wEpq6wI78C8DpKfrJ0Kh6l5zex+OOhxMpLYOSqEf jI2/vqoiesaZ9Hcy6BxWkdWxwRsGN6T30XPDOa4vZPC3AFKs2Q3Ku2BTlgsqi9rP hZdooK3QqIMCek8E0WnNum9C45e2wrBTsubIrCt4FdnZKMw9T9n3wQf5f2TEun2m /ePV0ri7g7tof+xqR3CYWS73Jj6W1DCDwphcoqg0R3u2sbDpyy/YqC7MGx1h1gXw Hup60O1TBw2krvWaJUaWBX/hOqaEA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddvjedgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeekuddrudekhedrudejhedrheejnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (57.175.185.81.rev.sfr.net [81.185.175.57]) by mail.messagingengine.com (Postfix) with ESMTPA id E79F5380086; Wed, 29 May 2019 06:51:18 -0400 (EDT) From: Thomas Monjalon To: Michael Santana Cc: dev@dpdk.org, Bruce Richardson , Rasesh Mody , Shahed Shaikh , Matan Azrad , Anatoly Burakov , Byron Marohn , Pablo de Lara Guarch , Aaron Conole Date: Wed, 29 May 2019 12:51:15 +0200 Message-ID: <2682254.EQDdmg2fsP@xps> In-Reply-To: <20190510145541.GB87@bricha3-MOBL.ger.corp.intel.com> References: <20190510145312.409-1-msantana@redhat.com> <20190510145541.GB87@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 10/05/2019 16:55, Bruce Richardson: > On Fri, May 10, 2019 at 10:53:12AM -0400, 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 > > > Looks a good cleanup, thanks. > > Acked-by: Bruce Richardson Applied, thanks