Page MenuHomeFreeBSD

Note slight difference between strlcpy and snprintf return values
Needs ReviewPublic

Authored by imp on Sun, Nov 15, 8:00 PM.
This revision needs review, but there are no reviewers specified.



On some systems, snprintf can return a negative value to signify an
error. strlcpy never does this.

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 34812
Build 31853: arc lint + arc unit

Event Timeline

imp requested review of this revision.Sun, Nov 15, 8:00 PM
imp created this revision.
scottl added inline comments.

I think it's essential to remove the passage in this section about strlcat and snprintf being equivalent. Otherwise you still have conflicting text, and now you've added even more conflicting and vague (the use of "some systems" here) text. Since the implementation of strlcat() is completely independent of snprintf(), nothing is gained by conveying or implying equivalence in the man page.

Should be fine. Maybe a separate CAVEATS section would be more suitable for this kind of note.