Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePAwO-0006dP-W4 for pgsql-committers@arkaria.postgresql.org; Wed, 13 Dec 2017 17:35:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePAwO-0004tX-A2 for pgsql-committers@arkaria.postgresql.org; Wed, 13 Dec 2017 17:35:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ePAwO-0004tN-5Z for pgsql-committers@lists.postgresql.org; Wed, 13 Dec 2017 17:35:32 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ePAwL-0004aT-6x for pgsql-committers@postgresql.org; Wed, 13 Dec 2017 17:35:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 779A320BFD; Wed, 13 Dec 2017 12:35:26 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 13 Dec 2017 12:35:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=MU5U9gWWavNaTVQJeKT66KU2dBlWi ySLDYvaTdnomrA=; b=kdXHPa/rRzMdVqU2d1WT4ghteDJGZJ6zXzM+oRTPOd3Iy bSZbr3vubxlz1maFIMz9yiVzGScrIotHIhJmG4msLvnLfHZsTQ03PBsjpg91oDP8 4dXeCS8CpwXYBrNEar8bPwSkku7H6zNozIJhBhzmPUwU724u4PBSzgGjwPmoX2VV RPfSgLkUP+RsNwIGYtB4I+aZoD3b46x3hgKFOUwIC2Q+C3p5eaiPNwOIoLRa449C Gq6sWl903s2WOi/IZPKe4F6fQuCZD6iIjAzkTnF2urLhuH7MK3VBml1gm0af1cD3 eeQyzut0FvTvHUcqH32Yo6QoSbSOhS7IANCn5WZpg== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 2BB692460B; Wed, 13 Dec 2017 12:35:25 -0500 (EST) Date: Wed, 13 Dec 2017 09:35:24 -0800 From: Andres Freund To: Robert Haas Cc: Christoph Berg , pgsql-committers Subject: Re: pgsql: Provide overflow safe integer math inline functions. Message-ID: <20171213173524.rjs7b3ahsong5zko@alap3.anarazel.de> References: <20171213101037.GA28753@msg.df7cb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2017-12-13 09:37:25 -0500, Robert Haas wrote: > On Wed, Dec 13, 2017 at 5:10 AM, Christoph Berg wrote: > > Re: Andres Freund 2017-12-13 > >> Provide overflow safe integer math inline functions. > > > > The new _overflow functions have buggy comments: > > > > /* > > * If a - b overflows, return true, otherwise store the result of a + b into > > * *result. ^ there > > What's wrong with that? After staring at it for a while, I seem to have partially mis-copied the note for addition to the subtraction operation... Greetings, Andres Freund