httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_util.c
Date Fri, 22 Mar 2002 21:41:14 GMT
trawick     02/03/22 13:41:14

  Modified:    modules/proxy proxy_util.c
  Log:
  fix some abuse of apr_port_t (flagged by Sun WorkShop)
  
  Revision  Changes    Path
  1.87      +7 -4      httpd-2.0/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- proxy_util.c	21 Mar 2002 12:05:45 -0000	1.86
  +++ proxy_util.c	22 Mar 2002 21:41:14 -0000	1.87
  @@ -214,7 +214,7 @@
        ap_proxy_canon_netloc(apr_pool_t *p, char **const urlp, char **userp,
   			char **passwordp, char **hostp, apr_port_t *port)
   {
  -    apr_port_t i;
  +    int i;
       char *strp, *host, *url = *urlp;
       char *user = NULL, *password = NULL;
   
  @@ -267,9 +267,12 @@
   	if (strp[i] != '\0') {
   	    return "Bad port number in URL";
   	} else if (i > 0) {
  -	    *port = atoi(strp);
  -	    if (*port > 65535)
  +            int int_port = atoi(strp);
  +
  +	    if (int_port > 65535)
   		return "Port number in URL > 65535";
  +
  +	    *port = (apr_port_t)int_port;
   	}
       }
       ap_str_tolower(host);		/* DNS names are case-insensitive */
  @@ -604,7 +607,7 @@
        proxy_get_host_of_request(request_rec *r)
   {
       char *url, *user = NULL, *password = NULL, *err, *host;
  -    apr_port_t port = -1;
  +    apr_port_t port;
   
       if (r->hostname != NULL)
   	return r->hostname;
  
  
  

Mime
View raw message