| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | Neil Conway <neilc(at)samurai(dot)com> |
| Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us> |
| Subject: | Re: execl() sentinel |
| Date: | 2007-07-18 21:22:36 |
| Message-ID: | 20070718212235.GA23029@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Neil Conway wrote:
> On Wed, 2007-07-18 at 16:59 +0200, Peter Eisentraut wrote:
> > It might be good to check the actual definition of NULL in this case, however,
> > before wondering further.
>
> Well, the existing coding is plainly wrong, regardless of the NULL
> implementation used on any given machine (although it will usually
> work). The simple rule is "you need to cast NULL to a pointer type when
> passing arguments to a variadic function, or to a function whose
> prototype is not in scope".
>
> So +1 on this patch from me.
Thanks, committed. I looked for other uses of execl(), execle() and
execlp() and found a single one of execl() which is already OK.
I wouldn't know how to look for other variadic functions using NULL
sentinels though.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Neil Conway | 2007-07-18 21:28:40 | Re: execl() sentinel |
| Previous Message | Neil Conway | 2007-07-18 17:31:55 | Re: execl() sentinel |