Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6bPd-0004cX-FU for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Jan 2022 16:51:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n6bPc-00029I-13 for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Jan 2022 16:51:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6bPb-000298-MJ for pgsql-hackers@lists.postgresql.org; Sun, 09 Jan 2022 16:51:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6bPZ-0003pE-DQ for pgsql-hackers@postgresql.org; Sun, 09 Jan 2022 16:51:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 209GpG3a1693543; Sun, 9 Jan 2022 11:51:16 -0500 From: Tom Lane To: Noah Misch cc: Zhihong Yu , PostgreSQL-development Subject: Re: null iv parameter passed to combo_init() In-reply-to: <20220109164854.GA309234@rfd.leadboat.com> References: <20220109015202.GB283924@rfd.leadboat.com> <20220109031100.GC283924@rfd.leadboat.com> <1643134.1641713553@sss.pgh.pa.us> <20220109164854.GA309234@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Sun, 09 Jan 2022 08:48:54 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1693541.1641747076.1@sss.pgh.pa.us> Date: Sun, 09 Jan 2022 11:51:16 -0500 Message-ID: <1693542.1641747076@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > On Sun, Jan 09, 2022 at 04:37:32AM -0800, Zhihong Yu wrote: >> On Sat, Jan 8, 2022 at 11:32 PM Tom Lane wrote: >>> FWIW, I liked the "ivlen > 0" formulation better. They should be >>> equivalent, because ivlen is unsigned, but it just seems like "> 0" >>> is more natural. > If I were considering the one code site in isolation, I'd pick "ivlen > 0". > But of the four sites identified so far, three have signed length variables. Oh, hmm. Unless we want to start changing those to unsigned, I agree a not-equal test is a safer convention. regards, tom lane