Re: Add missing const qualifier in ECPG

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: zhouqq(at)cs(dot)toronto(dot)edu
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Add missing const qualifier in ECPG
Date: 2005-11-30 13:01:24
Message-ID: 20051130130124.GA20593@1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I just applied most of your patch to 8.0, 8.1 and HEAD. The only thing I
didn't is:

diff -c -r1.7 memory.c
*** ecpglib/memory.c 15 Oct 2005 02:49:47 -0000 1.7
--- ecpglib/memory.c 16 Nov 2005 00:40:57 -0000
***************
*** 11,17 ****
void
ECPGfree(void *ptr)
{
! free(ptr);
}

char *
--- 11,18 ----
void
ECPGfree(void *ptr)
{
! if (ptr)
! free(ptr);
}

char *

Is there a reason why you changed this? Acocrding to the docs free(NULL)
does nothing anyway.

Also you mentioned:
...
seems we allow strdup() fails silently in various
places. Shall we do something about it?
...

Yes! Thanks for pointing this out. I already committed a patch that
changes alls strdup() calls to ECPGstrdup() calls that correctly raise
an error condition.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Fuhr 2005-11-30 16:50:56 Re: Strange interval arithmetic
Previous Message Tom Lane 2005-11-30 00:08:50 A couple of proposed pgbench changes