fts: Stop abusing the comma operator.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D49624

(cherry picked from commit 5abef29833)
This commit is contained in:
Dag-Erling Smørgrav 2025-04-01 15:56:52 +02:00
parent 84ed51c412
commit 9c84aea414

View file

@ -901,10 +901,12 @@ fts_stat(FTS *sp, FTSENT *p, int follow, int dfd)
int saved_errno;
const char *path;
if (dfd == -1)
path = p->fts_accpath, dfd = AT_FDCWD;
else
if (dfd == -1) {
path = p->fts_accpath;
dfd = AT_FDCWD;
} else {
path = p->fts_name;
}
/* If user needs stat info, stat buffer already allocated. */
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;