Closed
Bug 81593
Opened 24 years ago
Closed 24 years ago
inefficient use of strlen
Categories
(SeaMonkey :: Passwords & Permissions, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: drepper, Assigned: morse)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
(I hope the wallet extension falls into this category; if not please let me know.)
During some code inspections I did lately I came across many very inefficient
uses of strlen (or PR_strlen or ...). They generally fall into two categories:
- use of strlen() to test for empty strings; this could be done better by
a constant-time test for zero of the first character
- use of strlen() in a loop end test; this is inefficient since the test is
repeated in every iteration; the compiler cannot see that the result will
always be the same.
I'll now append a patch which removes these problems in the files in
extensions/wallet/src. I've tested it lightly.
Reporter | ||
Comment 1•24 years ago
|
||
Updated•24 years ago
|
Assignee | ||
Comment 2•24 years ago
|
||
Looks fine to me. Thanks for doing this.
r=morse
Comment 3•24 years ago
|
||
sr=blizzard
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
Comment 4•24 years ago
|
||
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Blocks: 83989
Assignee | ||
Comment 5•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•