Bug 244327 - usr.bin/xargs/xargs.c:653 omits variable check when checking for ENOENT
Summary: usr.bin/xargs/xargs.c:653 omits variable check when checking for ENOENT
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-23 00:44 UTC by thomas.duffy.99
Modified: 2020-02-23 20:30 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thomas.duffy.99 2020-02-23 00:44:59 UTC
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;