diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index f895412442d..99f71ac380e 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -127,7 +127,7 @@ PHPAPI int php_flock(int fd, int operation) {0, 0, 0, 0, NULL}; DWORD err; - if (hdl < 0) { + if (INVALID_HANDLE_VALUE == hdl) { _set_errno(EBADF); return -1; /* error in file descriptor */ }