tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pier P. Fumagalli" <p...@betaversion.org>
Subject Re: cvs commit: jakarta-tomcat-4.0/connectors/apache-1.3 mod_webapp.c
Date Thu, 14 Dec 2000 05:29:37 GMT
Jon Stevens <jon@latchkey.com> wrote:

> 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.

Whops.. Thanks. Wrong variable tested :)

    Pier

-- 
Pier Fumagalli  <http://www.betaversion.org/>  <mailto:pier@betaversion.org>
----------------------------------------------------------------------------



Mime
View raw message