Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero.

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero.
Дата
Msg-id 20051201213108.GC1287@svana.org
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero.  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [COMMITTERS] pgsql: Add comments about why errno is set  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Dec 01, 2005 at 04:12:30PM -0500, Bruce Momjian wrote:
> Well, there seems to be enough confusion, even in this email list, that
> identifying _why_ errno is being cleared is a good idea.
>
> I modified it to:
>
>         errno = 0;  /* avoid having to check the result for failure */

I don't know about others but I find that wording ambiguous. Like it's
saying that once you've done that it can't fail. I think I'd prefer
something like:

errno = 0;   /* Make error condition detectable */

or even

errno = 0;   /* clear pending errors */

or

errno = 0;   /* clear prior detected errors */

YMMV,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: SHOW ALL output too wide