| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера