From: Roland McGrath Date: Fri, 4 Sep 2015 21:37:56 +0000 (-0700) Subject: BZ#18921: Fix opendir inverted o_directory_works test. X-Git-Tag: upstream/2.24~1090 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd9e69abb887d78d0d6708fc089cc9f3eabf106d;p=platform%2Fupstream%2Fglibc.git BZ#18921: Fix opendir inverted o_directory_works test. --- diff --git a/ChangeLog b/ChangeLog index 1db8e31..53b6c24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-09-04 Roland McGrath + + [BZ #18921] + * sysdeps/posix/opendir.c (need_isdir_precheck) [O_DIRECTORY]: + Fix inverted sense of test of 'o_directory_works' value. + Reported by Pádraig Brady , diagnosed by + Bernhard Voelker . + 2015-09-04 Joseph Myers [BZ #14912] diff --git a/sysdeps/posix/opendir.c b/sysdeps/posix/opendir.c index 6509f5c..9edf056 100644 --- a/sysdeps/posix/opendir.c +++ b/sysdeps/posix/opendir.c @@ -105,7 +105,7 @@ need_isdir_precheck (void) tryopen_o_directory (); /* We can skip the expensive `stat' call if O_DIRECTORY works. */ - return o_directory_works > 0; + return o_directory_works < 0; #endif return true; }