diff options
author | twosee <twose@qq.com> | 2020-06-07 08:38:13 +0800 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-07 10:41:11 +0200 |
commit | 7d6a0ba8088c9abbb490013d0ea7099a86adefa9 (patch) | |
tree | 796d25925fc449eb1af92e44b0b666da4afaf093 /ext/standard/flock_compat.c | |
parent | 1d8233877c654fc1915080817a710ceb972682dd (diff) | |
download | php-git-7d6a0ba8088c9abbb490013d0ea7099a86adefa9.tar.gz |
Fix expression warnings and break warnings
Close GH-5675.
Diffstat (limited to 'ext/standard/flock_compat.c')
-rw-r--r-- | ext/standard/flock_compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index ecf28d8513..6751aedfc1 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -58,7 +58,7 @@ PHPAPI int php_flock(int fd, int operation) ret = fcntl(fd, operation & LOCK_NB ? F_SETLK : F_SETLKW, &flck); - if (operation & LOCK_NB && ret == -1 && + if ((operation & LOCK_NB) && ret == -1 && (errno == EACCES || errno == EAGAIN)) errno = EWOULDBLOCK; |