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/mappers mod_so.c
Date Sat, 03 Mar 2001 02:01:31 GMT
trawick     01/03/02 18:01:31

  Modified:    modules/mappers mod_so.c
  Log:
  Get rid of unnecessary apr_status_t variables in a couple of functions.
  
  In load_file(), use apr_dso_error() instead of apr_strerror() to build
  an error message after a apr_dso_load() failure.
  
  PR:			6980
  
  Revision  Changes    Path
  1.39      +4 -6      httpd-2.0/modules/mappers/mod_so.c
  
  Index: mod_so.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_so.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- mod_so.c	2001/02/16 04:26:40	1.38
  +++ mod_so.c	2001/03/03 02:01:30	1.39
  @@ -197,7 +197,6 @@
   static const char *load_module(cmd_parms *cmd, void *dummy, 
                                  const char *modname, const char *filename)
   {
  -    apr_status_t status;
       apr_dso_handle_t *modhandle;
       apr_dso_handle_sym_t modsym;
       module *modp;
  @@ -231,7 +230,7 @@
       /*
        * Load the file into the Apache address space
        */
  -    if ((status = apr_dso_load(&modhandle, szModuleFile, cmd->pool )) != APR_SUCCESS)
{
  +    if (apr_dso_load(&modhandle, szModuleFile, cmd->pool) != APR_SUCCESS) {
           char my_error[256];
   
           return apr_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
  @@ -247,7 +246,7 @@
        * First with the hidden variant (prefix `AP_') and then with the plain
        * symbol name.
        */
  -    if ((status = apr_dso_sym(&modsym, modhandle, modname)) != APR_SUCCESS) {
  +    if (apr_dso_sym(&modsym, modhandle, modname) != APR_SUCCESS) {
           char my_error[256];
   
   	return apr_pstrcat(cmd->pool, "Can't locate API module structure `",
  @@ -296,18 +295,17 @@
   
   static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
   {
  -    apr_status_t status;
       apr_dso_handle_t *handle;
       const char *file;
   
       file = ap_server_root_relative(cmd->pool, filename);
       
  -    if ((status = apr_dso_load(&handle, file, cmd->pool)) != APR_SUCCESS) {
  +    if (apr_dso_load(&handle, file, cmd->pool) != APR_SUCCESS) {
           char my_error[256];
   
   	return apr_pstrcat(cmd->pool, "Cannot load ", filename, 
   			  " into server: ", 
  -			  apr_strerror(status, my_error, sizeof(my_error)),
  +			  apr_dso_error(handle, my_error, sizeof(my_error)),
   			  NULL);
       }
       
  
  
  

Mime
View raw message