[Bug 262038] fts(3): Check for readdir(3) errors

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 11 Mar 2022 15:30:54 UTC

--- Comment #11 from Mark Johnston <markj@FreeBSD.org> ---
(In reply to Mahmoud Abumandour from comment #6)
Sorry for the delayed reply.  This mostly looks ok to me, but I have a few more
- Rather than setting errno = 0 in fts_safe_readdir(), I think it's better to
set readdir_errno only when readdir(2) fails.
- FreeBSD style (see the style(9) man page) is to put declarations at the
beginning of the function, so fts_safe_readdir() should declare "ret" at the
- The comment above the readdir_errno check does not seem to be needed.

You are receiving this mail because:
You are the assignee for the bug.