Re: Faster StrNCpy

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Faster StrNCpy
Дата
Msg-id 200610022325.k92NPmF17480@momjian.us
обсуждение исходный текст
Ответ на Re: Faster StrNCpy  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Neil Conway <neilc@samurai.com> writes:
> > A wholesale replacement of strncpy() calls is probably worth doing --
> > replacing them with strlcpy() if the source string is NUL-terminated,
> > and I suppose memcpy() otherwise.
> 
> What I'd like to do immediately is put in strlcpy() and hit the two or
> three places I think are performance-relevant.  I agree with trying to
> get rid of StrNCpy/strncpy calls over the long run, but it's just code
> beautification and probably not appropriate for beta.

Added to TODO:
* Use strlcpy() rather than our StrNCpy() macro

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Sane error messages for SSL retry cases
Следующее
От: "Sergey E. Koposov"
Дата:
Сообщение: Re: src/tools/msvc usage instructions