com php-src: fix error condition, part of bug #71753: ext/standard/flock_compat.c
| From: | Anatol Belski | Date: | Thu, 10 Mar 2016 10:35:50 +0000 |
| Subject: | com php-src: fix error condition, part of bug #71753: ext/standard/flock_compat.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91318@lists.php.net to get a copy of this message | ||
Commit: 8cd903ea685a6ef56aa77e95c00db8aac53a7c39
Author: Anatol Belski <ab@php.net> Thu, 10 Mar 2016 11:35:50 +0100
Parents: 67f0770036f866f6f0dadc044cdc8f94a5b9f030
Branches: PHP-5.6 PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8cd903ea685a6ef56aa77e95c00db8aac53a7c39
Log:
fix error condition, part of bug #71753
Bugs:
https://bugs.php.net/71753
Changed paths:
M ext/standard/flock_compat.c
Diff:
diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c
index f895412..99f71ac 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 */
}