Re: [HACKERS] CVS tip problems

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] CVS tip problems
Дата
Msg-id 18391.1086648307@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] CVS tip problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [HACKERS] CVS tip problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> ! #ifdef STRERROR_R_INT
> !     /* SUSv3 version */
> !     if (strerror_r(errnum, strerrbuf, buflen) == 0)
> !         return strerrbuf;
> !     else
> !         return NULL;
> ! #else

This code will dump core if strerror_r ever fails, which seems like
a bad idea.  I suggest that it be like

!     if (strerror_r(errnum, strerrbuf, buflen) == 0)
!         return strerrbuf;
!     else
!         return "strerror_r failed";

which at least gives a hint of the problem ...

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] CVS tip problems
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] CVS tip problems