Closed
Bug 92064
Opened 24 years ago
Closed 3 years ago
sprintf abuse
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: bratell, Unassigned)
References
()
Details
Note to self: Look through the uses of sprintf to convert a number to a string.
Some are obviously unnecessary and even stupid. sprintf seems to be 20 times
slower than AppendInt and inifinetely slower to using a constant string.
char buf[10];
sprintf(buf, "%d", -1);
... NS_ConvertASCIIToUCS2(buf) ...
could be replaced by
... NS_LITERAL_STRING("-1") ...
char size[10];
sprintf(size, "%d", buf.Length());
aData.AppendWithConversion(size);
can be replaced by:
aData.AppendInt(size);
http://lxr.mozilla.org/seamonkey/search?string=%5E%23s%23printf%23%28%23%22%25%23d%22%23%24®exp=on
http://lxr.mozilla.org/seamonkey/source/layout/html/forms/src/nsFormFrame.cpp#1271
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 1•16 years ago
|
||
This bug is being marked EXPIRED as it has seen no activity in a very long time.
If you think that the issue reported might still be relevant, please test with a recent release of SeaMonkey and if the problem persists feel free to re-open the report. Thank you.
http://www.seamonkey-project.org/
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → EXPIRED
Comment 2•16 years ago
|
||
Bulk reopening incorrectly expired bugs - no activity does not constitute no bug - these need proper checking.
Status: RESOLVED → REOPENED
Resolution: EXPIRED → ---
Updated•16 years ago
|
Product: SeaMonkey → Core
QA Contact: doronr → general
Whiteboard: CLOSEME? OBSOLETE?
Updated•16 years ago
|
Status: REOPENED → NEW
Comment 3•15 years ago
|
||
There seems to still be plenty of code like this.
Whiteboard: CLOSEME? OBSOLETE?
Comment 4•3 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: bratell → nobody
Flags: needinfo?(overholt)
Comment 5•3 years ago
|
||
If somebody still cares about this, they can open a new bug about it.
Status: NEW → RESOLVED
Closed: 16 years ago → 3 years ago
Component: General → XPCOM
Flags: needinfo?(overholt)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•