Re: [HACKERS] Unnecessary pointer-NULL checks in pgp-pgsql.c

2015-02-04 Thread Michael Paquier
On Thu, Feb 5, 2015 at 5:31 AM, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> (BTW, why do you not leave a blank line between quoted text and your >> responses?) > > +1. That vertical space is really helpful, at least to me. Will do if people here are better with that.

Re: [HACKERS] Unnecessary pointer-NULL checks in pgp-pgsql.c

2015-02-04 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > (BTW, why do you not leave a blank line between quoted text and your > responses?) +1. That vertical space is really helpful, at least to me. Thanks, Stephen signature.asc Description: Digital signature

Re: [HACKERS] Unnecessary pointer-NULL checks in pgp-pgsql.c

2015-02-04 Thread Robert Haas
On Wed, Feb 4, 2015 at 7:00 AM, Michael Paquier wrote: > Robert Haas wrote: >> I wrote: >>> src, dst and ctx are created respectively from mbuf_create_from_data, >>> mbuf_create and pgp_init which never return NULL and they are palloc'd >>> all the time. I think that we could simplify things with

Re: [HACKERS] Unnecessary pointer-NULL checks in pgp-pgsql.c

2015-02-04 Thread Michael Paquier
Robert Haas wrote: > I wrote: >> src, dst and ctx are created respectively from mbuf_create_from_data, >> mbuf_create and pgp_init which never return NULL and they are palloc'd >> all the time. I think that we could simplify things with the patch >> attached, note that I added an assertion for corr

Re: [HACKERS] Unnecessary pointer-NULL checks in pgp-pgsql.c

2015-02-03 Thread Robert Haas
On Sun, Feb 1, 2015 at 9:14 PM, Michael Paquier wrote: > Coverity is pointing out that we are doing pointer-NULL checks on > things that cannot be NULL in decrypt_internal(): > out: > - if (src) > - mbuf_free(src); > - if (ctx) > - pgp_free(ctx); > +