The branch main has been updated by des:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5abef29833d32d257a20b61732993987dd2a6056

commit 5abef29833d32d257a20b61732993987dd2a6056
Author:     Dag-Erling Smørgrav <d...@freebsd.org>
AuthorDate: 2025-04-01 13:56:52 +0000
Commit:     Dag-Erling Smørgrav <d...@freebsd.org>
CommitDate: 2025-04-01 13:59:42 +0000

    fts: Stop abusing the comma operator.
    
    MFC after:      1 week
    Sponsored by:   Klara, Inc.
    Reviewed by:    allanjude
    Differential Revision:  https://reviews.freebsd.org/D49624
---
 lib/libc/gen/fts.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index 80f98a993123..0c26c91feb84 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -900,10 +900,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;

Reply via email to