[Bug 244327] usr.bin/xargs/xargs.c:653 omits variable check when checking for ENOENT

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 23 00:45:02 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244327

            Bug ID: 244327
           Summary: usr.bin/xargs/xargs.c:653 omits variable check when
                    checking for ENOENT
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: thomas.duffy.99 at alumni.brown.edu

In usr.bin/xargs/xargs.c, line 653:

cause_exit = ENOENT ? 127 : 126;

No variable is compared to ENOENT, so it always returns 127.  This should
likely be:

cause_exit = errno == ENOENT ? 127 : 126;

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


More information about the freebsd-bugs mailing list