Re: Using the return value of strlcpy() and strlcat() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Using the return value of strlcpy() and strlcat()
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: Using the return value of strlcpy() and strlcat()  (David Rowley <[email protected]>)
List pgsql-hackers
David Rowley <[email protected]> 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 by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Suggestions on message transfer among backends
Next
From: Robert Haas
Date:
Subject: Re: Timeout parameters