tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <...@latchkey.com>
Subject Re: cvs commit: jakarta-tomcat-4.0/connectors/apache-1.3 mod_webapp.c
Date Thu, 14 Dec 2000 04:24:24 GMT
on 12/13/2000 7:47 PM, "pier@locus.apache.org" <pier@locus.apache.org>
wrote:

> +    char *t="";
> 
> if (r==NULL) return(FALSE);
> +    if (t!=NULL) t=ap_pstrdup(r->pool,type);
> 

My C is a bit rusty, but why is there a check to see if t!=NULL given that
it has been initialized to "" right above it?

> +    char *n="";
> +    char *v="";
> 
> if (r==NULL) return(FALSE);
> -
> -    ap_table_add(r->headers_out, name, value);
> +    
> +    if (n!=NULL) n=ap_pstrdup(r->pool,name);
> +    if (v!=NULL) v=ap_pstrdup(r->pool,value);
> +    

same here as well.

-jon


Mime
View raw message