httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/metadata mod_headers.c
Date Sun, 18 Apr 2004 17:11:09 GMT
nd          2004/04/18 10:11:09

  Modified:    modules/metadata mod_headers.c
  Log:
  remove unused parameters and minor memory leak
  
  Revision  Changes    Path
  1.54      +9 -8      httpd-2.0/modules/metadata/mod_headers.c
  
  Index: mod_headers.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_headers.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -u -r1.53 -r1.54
  --- mod_headers.c	18 Apr 2004 16:25:16 -0000	1.53
  +++ mod_headers.c	18 Apr 2004 17:11:09 -0000	1.54
  @@ -680,19 +680,20 @@
       {NULL}
   };
   
  -static void register_format_tag_handler(apr_pool_t *p, char *tag, void *tag_handler, int
def)
  +static void register_format_tag_handler(const char *tag,
  +                                        const void *tag_handler)
   {
  -    const void *h = apr_palloc(p, sizeof(h));
  -    h = tag_handler;
  -    apr_hash_set(format_tag_hash, tag, 1, h);
  +    apr_hash_set(format_tag_hash, tag, 1, tag_handler);
   }
  +
   static int header_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
   {
       format_tag_hash = apr_hash_make(p);
  -    register_format_tag_handler(p, "D", (void*) header_request_duration, 0);
  -    register_format_tag_handler(p, "t", (void*) header_request_time, 0);
  -    register_format_tag_handler(p, "e", (void*) header_request_env_var, 0);
  -    register_format_tag_handler(p, "s", (void*) header_request_ssl_var, 0);
  +    register_format_tag_handler("D", (const void *)header_request_duration);
  +    register_format_tag_handler("t", (const void *)header_request_time);
  +    register_format_tag_handler("e", (const void *)header_request_env_var);
  +    register_format_tag_handler("s", (const void *)header_request_ssl_var);
  +
       return OK;
   }
   
  
  
  

Mime
View raw message