summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-01-14 14:37:38 +0000
committerWez Furlong <wez@php.net>2004-01-14 14:37:38 +0000
commit09fb5dc1e64eaa7adbc0b1fa0c6afb07773a46be (patch)
tree5923e00f5f653638d27ea634a0253a7c7fdbcf13
parentcd4262eedd9da3c6b1d4292075842902b36704ea (diff)
downloadphp-git-09fb5dc1e64eaa7adbc0b1fa0c6afb07773a46be.tar.gz
Remove stale code from flock();
spotted by Hartmut.
-rw-r--r--ext/standard/file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 79abc8aa1e..f2982c388c 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -247,7 +247,7 @@ static int flock_values[] = { LOCK_SH, LOCK_EX, LOCK_UN };
PHP_FUNCTION(flock)
{
zval *arg1, *arg3 = NULL;
- int fd, act;
+ int act;
php_stream *stream;
long operation = 0;
@@ -257,10 +257,6 @@ PHP_FUNCTION(flock)
php_stream_from_zval(stream, &arg1);
- if (php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 1) == FAILURE) {
- RETURN_FALSE;
- }
-
act = operation & 3;
if (act < 1 || act > 3) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal operation argument");