On Mon, Jan 26, 2009 at 8:32 AM, Alex Hunsaker <badalex@gmail.com> wrote:
>
> -the various (only moved not added)
> strncpy(...)
> copy[len] = '\0';
>
> just use strlcpy?
>
Thanks for having a look Alex.
strlcpy would be easier, but I thought there might be portability
concerns re its non-entirely-standard status.
A quick grep through the backend code shows that strlcpy and strncpy
are both in use, with neither having a clear majority. I used strncpy
because it is more prevalent within src/backend/utils/adt.
Happy to use strlcpy if it is acceptable though. Anybody else have an
opinion on this?
Cheers,
BJ