Re: execl() sentinel

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: execl() sentinel
Дата
Msg-id 20070718212235.GA23029@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: execl() sentinel  (Neil Conway <neilc@samurai.com>)
Ответы Re: execl() sentinel
Список 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.

В списке pgsql-patches по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: execl() sentinel
Следующее
От: Neil Conway
Дата:
Сообщение: Re: execl() sentinel