Skip to content

Commit 64f5a71

Browse files
committed
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 5abef29)
1 parent 5630672 commit 64f5a71

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/libc/gen/fts.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,10 +901,12 @@ fts_stat(FTS *sp, FTSENT *p, int follow, int dfd)
901901
int saved_errno;
902902
const char *path;
903903

904-
if (dfd == -1)
905-
path = p->fts_accpath, dfd = AT_FDCWD;
906-
else
904+
if (dfd == -1) {
905+
path = p->fts_accpath;
906+
dfd = AT_FDCWD;
907+
} else {
907908
path = p->fts_name;
909+
}
908910

909911
/* If user needs stat info, stat buffer already allocated. */
910912
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;

0 commit comments

Comments
 (0)