Re: mcxt.c

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: mcxt.c
Дата
Msg-id 005801c3761b$40028f50$1f720b3e@mm.eutelsat.org
обсуждение исходный текст
Ответ на mcxt.c  ("Mendola Gaetano" <mendola@bigfoot.com>)
Ответы Re: mcxt.c  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> "Gaetano Mendola" <mendola@bigfoot.com> writes:
> > "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> >> This seems inappropriate to me.  Are you going to suggest that every
> >> routine that takes a pointer parameter needs to explicitly test for
> >> null?
>
> > Of course I'm not suggesting this, what I'm suggesting is put an
> > assert( ) if the test can slow down the performances and an "if ( ) "
> > in places that are not going to touch the performances.
>
> I see no value at all in an assert.  The code will dump core just fine
> with or without an assert ...

Right but an assert can display information about the file and line number
without debug the application, without mention that reading the code with
the assert is clear what are the precondictions for a call function.



Regards
Gaetano Mendola

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

Предыдущее
От: "Gaetano Mendola"
Дата:
Сообщение: Re: mcxt.c
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Minor lmgr code cleanup