You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/03/12 22:38:47 UTC
DO NOT REPLY [Bug 52893] New: Code clean up (various)
https://issues.apache.org/bugzilla/show_bug.cgi?id=52893
Bug #: 52893
Summary: Code clean up (various)
Product: Apache httpd-2
Version: 2.5-HEAD
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: enhancement
Priority: P2
Component: All
AssignedTo: bugs@httpd.apache.org
ReportedBy: christophe.jaillet@wanadoo.fr
Classification: Unclassified
Created attachment 28456
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28456
Proposed patch
Hi, here is a set of small modification that improve a bit, IMO, the source
code.
Feel free to merge it to trunk or not.
Hope this helps.
Best regards,
CJ
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
modules/aaa/mod_authz_core.c | 9 +++------
modules/http/http_protocol.c | 8 ++------
modules/lua/mod_lua.c | 7 +++----
modules/proxy/mod_proxy_ftp.c | 7 +++----
modules/proxy/proxy_util.c | 2 +-
modules/session/mod_session.c | 2 +-
modules/test/mod_policy.c | 9 ++++++---
server/core.c | 4 ++--
server/provider.c | 4 ++--
9 files changed, 23 insertions(+), 29 deletions(-)
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
modules/lua/mod_lua.c
- concat a call to apr_snprintf followed by apr_pstrcat into a single
apr_psprintf in order to improve readability.
modules/session/mod_session.c
- there is no need to call apr_pstrcat in order to strcat only one string !
Use apr_pstrdup instead
modules/proxy/mod_proxy_ftp.c
- no need to use a local variable here, do it the same way as for 'user' a
few line above
- no need to call apr_pstrcat to concat string literal. Do a direct
assignment as two lines below
modules/aaa/mod_authz_core.c
- reorder the way the message is generated in order to avoid a call to
apr_pstrcat. This way of building the error message is much more consistent
with the rest of the code source
modules/proxy/proxy_util.c
- no need to apr_pstrdup constant string here
modules/http/http_protocol.c
- remove a spurious comment. TRACE seems to be handled only if
(conf->trace_enable != AP_TRACE_DISABLE)
- all allowed methods are collected into a apr array, so why not use it
untill the end of the function ? Remove "recursive" calls to apr_pstrcat in
order to same memory and improve readability
modules/test/mod_policy.c
- do not have nested apr_pstrcat calls, because it duplicates memory.
Reorder the code to improve readability instead.
server/core.c
- build IPv6 server name as in other parts on the code. prefer
- formatting (missing spaces)
server/provider.c
- do not ask for a parameter that it not used
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52893] Code clean up (various)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52893
Christophe JAILLET <ch...@wanadoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 52893] Code clean up (various)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52893
Christophe JAILLET <ch...@wanadoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28456|0 |1
is patch| |
Attachment #28456|application/octet-stream |text/plain
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 52893] Code clean up (various)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52893
Stefan Fritsch <sf...@sfritsch.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Stefan Fritsch <sf...@sfritsch.de> ---
Thank. Committed as r1361801 with some more tweaks:
modules/http/http_protocol.c: further simplification
modules/test/mod_policy.c: further simplification
modules/proxy/mod_proxy_ftp.c: revert one part because it causes compiler
warning about discarded constness
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org