diff options
author | NIIBE Yutaka <[email protected]> | 2019-07-25 00:59:40 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2019-07-25 00:59:40 +0000 |
commit | 5f9f2c32b038848212bec9d9a95858c18b9a0eee (patch) | |
tree | 2eaf33a6cbeca055e3c428a9dc0f67aee44b7023 | |
parent | w32: Fix HANDLE to internal fd conversion. (diff) | |
download | libgpg-error-5f9f2c32b038848212bec9d9a95858c18b9a0eee.tar.gz libgpg-error-5f9f2c32b038848212bec9d9a95858c18b9a0eee.zip |
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 <[email protected]>
-rw-r--r-- | src/estream.c | 6 |
1 files changed, 1 insertions, 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 |