From: Wez Furlong Date: Thu, 26 Sep 2002 10:17:41 +0000 (+0000) Subject: Remove an unused variable and a now-unused function. X-Git-Tag: MODERN_SYMMETRIC_SESSION_BEHAVIOUR_20021003~163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c2a9c091b2ce50c26ffe1b75ebe1679faa675b5;p=php Remove an unused variable and a now-unused function. --- diff --git a/ext/standard/file.c b/ext/standard/file.c index e7d865e6f2..b3d2fb539f 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1114,41 +1114,6 @@ PHP_FUNCTION(socket_set_timeout) #endif /* HAVE_SYS_TIME_H || defined(PHP_WIN32) */ /* }}} */ - -/* {{{ proto array socket_get_status(resource socket_descriptor) - Return an array describing socket status */ -PHP_FUNCTION(socket_get_status) -{ - zval **socket; - php_stream *stream; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), &socket) == FAILURE) { - WRONG_PARAM_COUNT; - } - - php_stream_from_zval(stream, socket); - - - array_init(return_value); - - if (php_stream_is(stream, PHP_STREAM_IS_SOCKET)) { - - php_netstream_data_t *sock = PHP_NETSTREAM_DATA_FROM_STREAM(stream); - - add_assoc_bool(return_value, "timed_out", sock->timeout_event); - add_assoc_bool(return_value, "blocked", sock->is_blocked); - add_assoc_bool(return_value, "eof", sock->eof); - add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos); - - } - else { - RETURN_FALSE; - } - -} -/* }}} */ - - /* {{{ proto string fgets(resource fp[, int length]) Get a line from file pointer */ PHPAPI PHP_FUNCTION(fgets) diff --git a/ext/standard/file.h b/ext/standard/file.h index edaca259d6..3990504509 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -57,7 +57,6 @@ PHP_FUNCTION(file_get_contents); PHP_FUNCTION(set_socket_blocking); /* deprecated */ PHP_FUNCTION(socket_set_blocking); PHP_FUNCTION(socket_set_timeout); -PHP_FUNCTION(socket_get_status); PHP_FUNCTION(set_file_buffer); PHP_FUNCTION(get_meta_tags); PHP_FUNCTION(flock); diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 3fb3f82705..ba1858696f 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -283,7 +283,7 @@ php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, ch while (!body && !php_stream_eof(stream)) { if (php_stream_gets(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE-1) != NULL) { - char *p, *ws; + char *p; int found_eol = 0; int http_header_line_length;