From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | olly(at)lfix(dot)co(dot)uk, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] CVS tip problems |
Date: | 2004-06-07 22:45:07 |
Message-ID: | 18391.1086648307@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-06-07 22:46:30 | Re: [HACKERS] CVS tip problems |
Previous Message | Bruce Momjian | 2004-06-07 22:39:23 | Re: [HACKERS] CVS tip problems |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-06-07 22:46:30 | Re: [HACKERS] CVS tip problems |
Previous Message | Bruce Momjian | 2004-06-07 22:39:23 | Re: [HACKERS] CVS tip problems |