Re: [COMMITTERS] pgsql: Add comments about why errno is set
От | Bruce Momjian |
---|---|
Тема | Re: [COMMITTERS] pgsql: Add comments about why errno is set |
Дата | |
Msg-id | 200512012138.jB1Lcu400933@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero. (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: [COMMITTERS] pgsql: Add comments about why errno is
|
Список | pgsql-hackers |
Martijn van Oosterhout wrote: -- Start of PGP signed section. > 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 */ Maybe it should be: errno = 0; /* Allow unconditional errno check */ -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-hackers по дате отправления: