ftw.3: Add examples
Details
- Reviewers
bcr jilles - Group Reviewers
manpages - Commits
- rS359128: MFC 358674, 358916:
rS359127: MFC 358674, 358916: Add examples to ftw.3
rS358674: ftw.3: Add examples
The example compiles and runs just fine.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
The description of what it does makes sense, although I can't spot if that's actually what the code does.
Otherwise, LGTM.
lib/libc/gen/ftw.3 | ||
---|---|---|
162 ↗ | (On Diff #62417) | Given that POSIX.1-2008tc2 says that ftw() is obsolete and applications should use nftw() instead, it seems better to have the example use nftw() instead. |
163 ↗ | (On Diff #62417) | can be used. |
189 ↗ | (On Diff #62417) | Not having a default in this switch feels somewhat uncomfortable, especially because POSIX says FTW_SL is a valid value here. |
lib/libc/gen/ftw.3 | ||
---|---|---|
189 ↗ | (On Diff #62417) | Especially for example code it would be better to have defined behaviour for all values of typeflag. Consider that people might copy and paste. |
lib/libc/gen/ftw.3 | ||
---|---|---|
189 ↗ | (On Diff #62417) | Paranoia in case the code is edited to remove cases or to add a flag (that does not exist yet) requesting a new typeflag value. Initializing type or adding a default would avoid that. |