Bug 51329 - Code clean up (mod_imagemap.c)
Summary: Code clean up (mod_imagemap.c)
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_imap (show other bugs)
Version: 2.5-HEAD
Hardware: PC Windows 2000
: P2 trivial (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2011-06-06 19:26 UTC by Christophe JAILLET
Modified: 2011-06-13 11:24 UTC (History)
0 users



Attachments
Proposed patch (2.60 KB, application/octet-stream)
2011-06-06 19:26 UTC, Christophe JAILLET
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe JAILLET 2011-06-06 19:26:48 UTC
Created attachment 27120 [details]
Proposed patch

Hi,

here is a patch that makes some small speed-up/clean-up in 'mod_imagemap.c'.


1) use apr_palloc instead of apr_pcalloc when all the fields of the allocated structure are set afterwards.

2) avoid useless calls to 'strcasecmp' when we have already found what we are looking for.
Comment 1 Stefan Fritsch 2011-06-13 11:24:43 UTC
I have commited this patch as r1135089.

But I think that mod_imagemap, mod_ident, and mod_cern_meta are so utterly obsolete that we should not waste more time on optimizing them. Please concentrate on different code parts in the future ;-) . Thanks.