]> granicus.if.org Git - php/commitdiff
Remove stale code from flock();
authorWez Furlong <wez@php.net>
Wed, 14 Jan 2004 14:37:38 +0000 (14:37 +0000)
committerWez Furlong <wez@php.net>
Wed, 14 Jan 2004 14:37:38 +0000 (14:37 +0000)
spotted by Hartmut.

ext/standard/file.c

index 79abc8aa1ebbe2672fe31e265601fa774229a40a..f2982c388ca3a86060c09fa28db75d607e625891 100644 (file)
@@ -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");