Re: git: cb96a0ef0040 - main - cp: Minor code cleanup.

From: Dag-Erling_Smørgrav <des_at_FreeBSD.org>
Date: Fri, 03 Feb 2023 16:08:11 UTC
"Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> writes:
> Wouldnt it now be possible for code in the fts_read path to reference
> errno unintialized?

Can you provide a test case?

We (cp) only look at errno if fts_read() returns NULL, and that only
happens after an error (errno is expected to be set) or when we're done
(fts_read() explicitly sets errno to 0).

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org