Closed
Bug 403960
Opened 18 years ago
Closed 4 years ago
Use strchr, not strstr, for single-character seaches
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: swsnyder, Unassigned)
Details
(Keywords: perf)
Attachments
(1 file)
|
6.11 KB,
patch
|
Details | Diff | Splinter Review |
There are several uses of the strstr() function to determine if/where a given string contains a specific character. This search is more efficiently done using strchr().
At minimum, strchr has only a single pointer to validate, instead of the 2 pointers passed to strstr(). Beyond that it is just faster to find a single character in a string than it is to find an array of characters (substring).
This patches touches mostly, but not exclusively, mailnews.
| Reporter | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
| Reporter | ||
Updated•18 years ago
|
Assignee: general → swsnyder
Status: ASSIGNED → NEW
Updated•18 years ago
|
Product: Mozilla Application Suite → Core
| Reporter | ||
Comment 1•16 years ago
|
||
Superceded by application-specific bugs: 509730 and 509721.
Updated•16 years ago
|
QA Contact: general → general
Comment 2•4 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:overholt, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: swsnyder → nobody
Flags: needinfo?(overholt)
Comment 3•4 years ago
|
||
Looks like this got fixed elsewhere. If not, somebody can file new bugs if they care.
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(overholt)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•