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

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 07 Mar 2022 17:29:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262038

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open
                 CC|                            |markj@FreeBSD.org

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
This looks ok to me overall.  A couple of comments:
- We have fts-compat.c and fts-compat11.c which appear to have the same bug.
- There are some style bugs: missing parens around the return value in
fts_safe_readdir(); extra indentation for line 882 should be by four spaces,
not a tab.

I also think it'd be better to avoid checking errno directly, and instead
modify fts_safe_readdir() to take a pointer to a readdir_errno integer
variable, setting that if an error occurs.  Maybe it's not worth it to diverge
much from other copies of this code, though.

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