Closed
Bug 36795
Opened 24 years ago
Closed 24 years ago
Returning uninitialized variable
Categories
(SeaMonkey :: Bookmarks & History, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jim_nance, Assigned: mozilla)
Details
The following code is returning rv uninitialized: nsresult nsBookmarksService::getLocaleString(const char *key, nsString &str) { PRUnichar *keyUni = nsnull; nsAutoString keyStr; keyStr.AssignWithConversion(key); nsresult rv; if (mBundle && (NS_SUCCEEDED(rv = mBundle->GetStringFromName(keyStr.GetU nicode(), &keyUni))) && (keyUni)) { str = keyUni; nsCRT::free(keyUni); } else { str.Truncate(); } return(rv); } Notice that if mBundle is 0, then rv is not set before it is returned. I would just fix this, but I dont know what it should return in that case. This code is at line 1978 of xpfe/components/bookmarks/src/nsBookmarksService.cpp
Assignee | ||
Comment 2•24 years ago
|
||
Fixed.
Status: NEW → 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
•