Re: Using the return value of strlcpy() and strlcat()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using the return value of strlcpy() and strlcat()
Дата
Msg-id 24531.1552571441@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using the return value of strlcpy() and strlcat()  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> We should have maybe thought a bit harder when we put that strlcpy
> code into the codebase and considered if we might have been better off
> inventing our own function that just returns what it did copy instead
> of what it would have.

Well, strlcpy is (somewhat) standardized; we didn't just invent it
off the cuff.  I thought a little bit about whether it would be worth
having a variant version with a different return value, but concluded
that having YA strcpy variant would more likely be a dangerous source
of thinkos than something that was actually helpful.  Otherwise I'd
have given Ashwin a more positive reaction...

            regards, tom lane


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

Предыдущее
От: Antonin Houska
Дата:
Сообщение: Re: Suggestions on message transfer among backends
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Timeout parameters