From bd6eaf918c50642423b00b4be8eaa933a9e77135 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 3 Jun 2015 13:26:00 +0200 Subject: [PATCH] msvcrt: Get rid of msvcrt_is_valid_fd helper. --- dlls/msvcrt/file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 1d144b2f1c9..5644a612048 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -304,11 +304,6 @@ static inline MSVCRT_FILE* msvcrt_get_file(int i) return &ret->file; } -static inline BOOL msvcrt_is_valid_fd(int fd) -{ - return fd >= 0 && fd < MSVCRT_fdend && (get_ioinfo_nolock(fd)->wxflag & WX_OPEN); -} - /* INTERNAL: free a file entry fd */ static void msvcrt_free_fd(int fd) { @@ -454,7 +449,7 @@ static MSVCRT_FILE* msvcrt_alloc_fp(void) static int msvcrt_init_fp(MSVCRT_FILE* file, int fd, unsigned stream_flags) { TRACE(":fd (%d) allocating FILE*\n",fd); - if (!msvcrt_is_valid_fd(fd)) + if (!(get_ioinfo_nolock(fd)->wxflag & WX_OPEN)) { WARN(":invalid fd %d\n",fd); *MSVCRT___doserrno() = 0;