]> Savannah Git Hosting - gnulib.git/commit
openat: omit unnecessary fd test
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Nov 2024 16:13:26 +0000 (08:13 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Nov 2024 19:23:33 +0000 (11:23 -0800)
commit131bc8e3fedd1df84fe8572be85d44f0223fc7b5
tree3eadadc9fbaacbb42c2f7345120061b5a158b0c0
parentb52d021b6ca137d0a9f5d6c4e9888674f37acba8
openat: omit unnecessary fd test

* lib/openat.c (openat_permissive): Close fd regardless
of whether it’s STDERR_FILENO.  This saves a bit of code space
and there’s no point to making this unlikely path faster.
Also change a couple of != 0 to < 0 for clarity
when -1 is the only option.
ChangeLog
lib/openat.c