From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92F92C28CC0 for ; Wed, 29 May 2019 10:51:26 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id ACDE620B1F for ; Wed, 29 May 2019 10:51:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="FI7AvWs5"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="I7ppozhp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACDE620B1F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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