Re: Silly coding in pgcrypto

From: Noah Misch <noah(at)leadboat(dot)com>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Silly coding in pgcrypto
Date: 2014-11-02 21:34:34
Message-ID: 20141102213434.GA540883@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 02, 2014 at 05:10:25AM +0100, Marko Tiikkaja wrote:
> *** a/contrib/pgcrypto/pgp-decrypt.c
> --- b/contrib/pgcrypto/pgp-decrypt.c
> ***************
> *** 1069,1075 **** pgp_skip_packet(PullFilter *pkt)
>
> while (res > 0)
> res = pullf_read(pkt, 32 * 1024, &tmp);
> ! return res < 0 ? res : 0;
> }
>
> /*
> --- 1069,1075 ----
>
> while (res > 0)
> res = pullf_read(pkt, 32 * 1024, &tmp);
> ! return res;

Why is the old code silly and the new code correct?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2014-11-02 21:51:31 Re: Silly coding in pgcrypto
Previous Message Tom Lane 2014-11-02 19:41:25 Re: Let's drop two obsolete features which are bear-traps for novices