Re: CVS tip problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: olly(at)lfix(dot)co(dot)uk
Cc: pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: CVS tip problems
Date: 2004-06-01 13:51:11
Message-ID: 2336.1086097871@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> - strerror_r(errnum, strerrbuf, buflen);
> + char buf[256];
> + StrNCpy(strerrbuf, strerror_r(errnum, buf, 256), buflen);
> return strerrbuf;

Easier and safer would be

> - strerror_r(errnum, strerrbuf, buflen);
> - return strerrbuf;
> + return strerror_r(errnum, strerrbuf, buflen);

The real point here is that we need to code differently depending on
which flavor of strerror_r we have.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2004-06-01 14:39:31 Re: [pgsql-hackers-win32] select like...not using index
Previous Message Tom Lane 2004-06-01 13:42:46 Re: Fast index build vs. PITR

Browse pgsql-patches by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2004-06-01 19:12:55 small fix in FAQ
Previous Message Harald Fuchs 2004-06-01 08:10:38 Re: pg_dump --comment?