]> git.ipfire.org Git - thirdparty/man-pages.git/commit
readdir.3: Handle -1 error from pathconf() in example code snippet
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 7 Jul 2012 05:40:07 +0000 (07:40 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 19 Jul 2012 10:51:28 +0000 (12:51 +0200)
commiteb059156a760545b5f474930003c7fc535bda1ab
treede4c388675c38dc6e0809449a90736dd0a724e00
parent02ff975dc79eeecbac17e8e7934bae54315dc757
readdir.3: Handle -1 error from pathconf() in example code snippet

Improve the example demonstrating allocation of a buffer
for readdir_r() to handle -1 error return from pathconf().
Otherwise, naive readers may think that pathconf() return
value can be used without checking.

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/readdir.3