You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2012/10/14 08:54:36 UTC
svn commit: r1398025 - in /httpd/httpd/trunk:
modules/generators/mod_autoindex.c modules/lua/lua_vmprep.c
modules/ssl/ssl_engine_vars.c server/error_bucket.c
Author: jailletc36
Date: Sun Oct 14 06:54:36 2012
New Revision: 1398025
URL: http://svn.apache.org/viewvc?rev=1398025&view=rev
Log:
No need to test for NULL before calling apr_pstrdup.
Modified:
httpd/httpd/trunk/modules/generators/mod_autoindex.c
httpd/httpd/trunk/modules/lua/lua_vmprep.c
httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
httpd/httpd/trunk/server/error_bucket.c
Modified: httpd/httpd/trunk/modules/generators/mod_autoindex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_autoindex.c?rev=1398025&r1=1398024&r2=1398025&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_autoindex.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_autoindex.c Sun Oct 14 06:54:36 2012
@@ -207,7 +207,7 @@ static void push_item(apr_array_header_t
}
p->type = type;
- p->data = data ? apr_pstrdup(arr->pool, data) : NULL;
+ p->data = apr_pstrdup(arr->pool, data);
p->apply_path = apr_pstrcat(arr->pool, path, "*", NULL);
if ((type == BY_PATH) && (!ap_is_matchexp(to))) {
Modified: httpd/httpd/trunk/modules/lua/lua_vmprep.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_vmprep.c?rev=1398025&r1=1398024&r2=1398025&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_vmprep.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_vmprep.c Sun Oct 14 06:54:36 2012
@@ -356,10 +356,10 @@ static ap_lua_vm_spec* copy_vm_spec(apr_
{
ap_lua_vm_spec* copied_spec = apr_pcalloc(pool, sizeof(ap_lua_vm_spec));
copied_spec->bytecode_len = spec->bytecode_len;
- copied_spec->bytecode = spec->bytecode ? apr_pstrdup(pool, spec->bytecode) : 0;
+ copied_spec->bytecode = apr_pstrdup(pool, spec->bytecode);
copied_spec->cb = spec->cb;
copied_spec->cb_arg = NULL;
- copied_spec->file = spec->file ? apr_pstrdup(pool, spec->file) : 0;
+ copied_spec->file = apr_pstrdup(pool, spec->file);
copied_spec->package_cpaths = apr_array_copy(pool, spec->package_cpaths);
copied_spec->package_paths = apr_array_copy(pool, spec->package_paths);
copied_spec->pool = pool;
Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c?rev=1398025&r1=1398024&r2=1398025&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c Sun Oct 14 06:54:36 2012
@@ -508,7 +508,7 @@ static char *ssl_var_lookup_ssl_cert(apr
result = ssl_var_lookup_ssl_cert_PEM(p, xs);
}
- if (result != NULL && resdup)
+ if (resdup)
result = apr_pstrdup(p, result);
return result;
}
Modified: httpd/httpd/trunk/server/error_bucket.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/error_bucket.c?rev=1398025&r1=1398024&r2=1398025&view=diff
==============================================================================
--- httpd/httpd/trunk/server/error_bucket.c (original)
+++ httpd/httpd/trunk/server/error_bucket.c Sun Oct 14 06:54:36 2012
@@ -45,7 +45,7 @@ AP_DECLARE(apr_bucket *) ap_bucket_error
h = apr_bucket_alloc(sizeof(*h), b->list);
h->status = error;
- h->data = (buf) ? apr_pstrdup(p, buf) : NULL;
+ h->data = apr_pstrdup(p, buf);
b = apr_bucket_shared_make(b, h, 0, 0);
b->type = &ap_bucket_type_error;