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 Passed - Unit
No Test Coverage - Build Status
Buildable 29133 Build 27069: arc lint + arc unit
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 | 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 | can be used. | |
189 | 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 | 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 | 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. |