Bug 53837 - Code clean up (various)
Summary: Code clean up (various)
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: All (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2012-09-06 20:17 UTC by Christophe JAILLET
Modified: 2013-01-28 21:02 UTC (History)
0 users



Attachments
Proposed patch (7.75 KB, patch)
2012-09-06 20:17 UTC, Christophe JAILLET
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe JAILLET 2012-09-06 20:17:56 UTC
Created attachment 29337 [details]
Proposed patch

Hi,

here is a set of small obvious clean up.

* No need to test for NULL before calling apr_pstrdup
     server/error_bucket.c
     modules/generators/mod_autoindex.c
     modules/lua/lua_vmprep.c
     modules/ssl/ssl_engine_vars.c


* s/;;/;/
     modules/generators/mod_autoindex.c
     modules/dav/main/util.c
     server/provider.c
     modules/examples/mod_example_hooks.c
     modules/loggers/mod_log_config.c
     modules/session/mod_session.c

* use apr_table_setn when strings are constant or already pool allocated
     modules/examples/mod_example_hooks.c

* simplify using 'apr_hash_this_key_len'
     modules/session/mod_session_crypto.c

* no need to apr_calloc when the memory is fully written just after allocation
     modules/ldap/util_ldap.c

* only compute new length if something has been added to the string
     server/apreq_cookie.c


Best regards,
CJ