vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Mar 19 23:35:13 2012 +0200| [04b1b0a687aba5ebba8e0128807e42725ab5d5d0] | committer: Rémi Denis-Courmont
vlc_opendir: simplify and partly revert previous commit opendir() sets close-on-exec anyway. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04b1b0a687aba5ebba8e0128807e42725ab5d5d0 --- src/posix/filesystem.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/src/posix/filesystem.c b/src/posix/filesystem.c index 81dd3a9..8066bb1 100644 --- a/src/posix/filesystem.c +++ b/src/posix/filesystem.c @@ -133,18 +133,7 @@ int vlc_mkdir (const char *dirname, mode_t mode) */ DIR *vlc_opendir (const char *dirname) { -#ifdef O_DIRECTORY - int fd = vlc_open (dirname, O_RDONLY | O_DIRECTORY); -#else /* If O_DIRECTORY is missing. fdopendir() will deal with ENOTDIR. */ - int fd = vlc_open (dirname, O_RDONLY); -#endif - if (fd == -1) - return NULL; - - DIR *dir = fdopendir (fd); - if (dir == NULL) - close (fd); - return dir; + return opendir (dirname); } /** _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
