]> granicus.if.org Git - php/commitdiff
fix error condition, part of bug #71753
authorAnatol Belski <ab@php.net>
Thu, 10 Mar 2016 10:35:50 +0000 (11:35 +0100)
committerAnatol Belski <ab@php.net>
Thu, 10 Mar 2016 10:35:50 +0000 (11:35 +0100)
ext/standard/flock_compat.c

index f895412442d8388330f05f526ad949485a79c30e..99f71ac380e8afa62683e20938f1fc2415b63515 100644 (file)
@@ -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 */
        }