From 5f9f2c32b038848212bec9d9a95858c18b9a0eee Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 25 Jul 2019 09:59:40 +0900 Subject: estream: Fix IS_INVALID_FD. * src/estream.c (IS_INVALID_FD): Simply compare to -1. -- Perhaps, when it was written at first, use of HANDLE was in mind. Now, we have different set of methods for Windows, and this macro is only for integer fd access, no need of ifdef/endif. Signed-off-by: NIIBE Yutaka --- src/estream.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/estream.c b/src/estream.c index e1a123e..6db20ca 100644 --- a/src/estream.c +++ b/src/estream.c @@ -154,11 +154,7 @@ int _setmode (int handle, int mode); # define _set_errno(a) do { errno = (a); } while (0) #endif -#ifdef HAVE_W32_SYSTEM -# define IS_INVALID_FD(a) ((void*)(a) == (void*)(-1)) /* ?? FIXME. */ -#else -# define IS_INVALID_FD(a) ((a) == -1) -#endif +#define IS_INVALID_FD(a) ((a) == -1) /* Calculate array dimension. */ #ifndef DIM -- cgit v1.2.3