mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-27 01:44:20 +00:00
(main): Avoid an unnecessary system call introduced in previous patch.
This commit is contained in:
parent
708ba31420
commit
dab9c7e59b
@ -318,12 +318,7 @@ main (int argc, char **argv)
|
||||
if (fstat (STDOUT_FILENO, &outstat) == 0
|
||||
&& stat (NULL_DEVICE, &nullstat) == 0
|
||||
&& 0 < same_file (&outstat, &nullstat))
|
||||
comparison_type =
|
||||
((fstat (STDERR_FILENO, &outstat) == 0
|
||||
? 0 < same_file (&outstat, &nullstat)
|
||||
: errno == EBADF)
|
||||
? type_status
|
||||
: type_no_stdout);
|
||||
comparison_type = type_no_stdout;
|
||||
}
|
||||
|
||||
/* If only a return code is needed,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user