Closed Bug 92064 Opened 24 years ago Closed 3 years ago

sprintf abuse

Categories

(Core :: XPCOM, defect)

defect
Not set
trivial

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&regexp=on http://lxr.mozilla.org/seamonkey/source/layout/html/forms/src/nsFormFrame.cpp#1271
Depends on: 170160
Product: Browser → Seamonkey
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
Bulk reopening incorrectly expired bugs - no activity does not constitute no bug - these need proper checking.
Status: RESOLVED → REOPENED
Resolution: EXPIRED → ---
Product: SeaMonkey → Core
QA Contact: doronr → general
Whiteboard: CLOSEME? OBSOLETE?
Status: REOPENED → NEW
There seems to still be plenty of code like this.
Whiteboard: CLOSEME? OBSOLETE?
No longer blocks: 1116074

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)

If somebody still cares about this, they can open a new bug about it.

Status: NEW → RESOLVED
Closed: 16 years ago3 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.