diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2009-03-07 22:36:42 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2009-03-07 22:36:42 +0000 |
commit | dbe08731504e8de9d7099a1e95ee13ffb3bb5123 (patch) | |
tree | 9eb768b7d2f074a21cf076e35edafb4d96242ebd | |
parent | eb6f6181a71cc2519227e70f20b449348e2d330b (diff) | |
download | php-git-dbe08731504e8de9d7099a1e95ee13ffb3bb5123.tar.gz |
MFB: Adjust previous fix to avoid compiler warnings
-rw-r--r-- | sapi/apache_hooks/php_apache.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index 52bd180570..47a9553e76 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -713,22 +713,21 @@ PHP_FUNCTION(apache_request_server_port) PHP_FUNCTION(apache_request_remote_host) { zval *id; - long ztype = NULL; + long type = 0; request_rec *r; char *res; - int type = REMOTE_NAME; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &ztype) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &type) == FAILURE) { return; } - if (ztype) { - type = ztype; + if (!type) { + type = REMOTE_NAME } APREQ_GET_REQUEST(id, r); - res = (char *)ap_get_remote_host(r->connection, r->per_dir_config, type); + res = (char *)ap_get_remote_host(r->connection, r->per_dir_config, (int)type); if (res) { RETURN_STRING(res, 1); |