While these are simila to snprintf, it's not ultimately helpful to say they are
the same. The fiddly differences aren't so fiddly, it turns out. Reword to make
this clear.
Details
- Reviewers
- None
- Group Reviewers
manpages - Commits
- rG5e50a0f39ff7: strlcpy/strlcat: Remove references to snprintf
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/libc/string/strlcpy.3 | ||
---|---|---|
131 | 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.
While these are simila to snprintf, it's not ultimately helpful to say they are the same.
They aren't the same but they are similar enough in usage (which is more important than how they relate to each other in implementation) to be cross referenced their respective manual pages.
I would even add a memccpy(3) reference here.
Not sure memccpy is useful to bring up here, so left that out.
The point of the commit is to reduce tenuous comparisons, not increase them.