From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] rte mempool: division or modulo by zero Date: Tue, 24 May 2016 11:07:59 +0200 Message-ID: <3912401.t7DCyFBsR0@xps13> References: <1463661395-6979-1-git-send-email-slawomirx.mrozowicz@intel.com> <5742E961.4060501@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Olivier Matz To: Slawomir Mrozowicz Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id BB1B55A57 for ; Tue, 24 May 2016 11:08:01 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id n129so118439000wmn.1 for ; Tue, 24 May 2016 02:08:01 -0700 (PDT) In-Reply-To: <5742E961.4060501@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Please take care of the title. Here you know it is not a modulo but you keep copying the coverity message. It is fixed to "mempool: avoid division by zero" 2016-05-23 13:28, Olivier Matz: > On 05/19/2016 02:36 PM, Slawomir Mrozowicz wrote: > > Fix issue reported by Coverity. > > > > Coverity ID 13243: Division or modulo by zero > > In function call rte_mempool_xmem_size, division by expression total_size > > which may be zero has undefined behavior. Please prefer this format instead of the first 2 lines: Coverity issue: 13243 > > Fixes: 148f963fb532 ("xen: core library changes") > > > > Signed-off-by: Slawomir Mrozowicz > > Acked-by: Olivier Matz Applied, thanks