Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W0BTO-0007xa-R4 for pgsql-odbc@arkaria.postgresql.org; Mon, 06 Jan 2014 14:48:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W0BTO-0007ru-7A for pgsql-odbc@arkaria.postgresql.org; Mon, 06 Jan 2014 14:48:10 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W0BTM-0007p4-IT for pgsql-odbc@postgresql.org; Mon, 06 Jan 2014 14:48:08 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W0BTI-00025V-Mp for pgsql-odbc@postgresql.org; Mon, 06 Jan 2014 14:48:08 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s06Em2Oe022876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Jan 2014 09:48:03 -0500 Received: from nb.usersys.redhat.com (unused-4-200.brq.redhat.com [10.34.4.200]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s06Em2e5031919; Mon, 6 Jan 2014 09:48:02 -0500 From: Pavel Raiskup To: Heikki Linnakangas Cc: psql-odbc Subject: Re: Static analysis fix request Date: Mon, 06 Jan 2014 15:48:01 +0100 Message-ID: <27238438.jIy8boxxDo@nb.usersys.redhat.com> Organization: Red Hat User-Agent: KMail/4.11.4 (Linux/3.12.6-300.fc20.x86_64; KDE/4.11.4; x86_64; ; ) References: <38586059.r5Bu4hye1i@nb.usersys.redhat.com> <52CA8222.4000208@vmware.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Pg-Spam-Score: -7.2 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org > That code is really difficult to read, and hence difficult to get > correct. Since we've already been burned twice by it, let's make it less > error-prone. How about the attached? Does that look correct to you? Thanks for looking at this, I don't see a problem in your patch; the code should not change behavior (except not touching outside array borders). -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc