mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
clean up some string usage. rs=mscott
This commit is contained in:
parent
d04902ac6d
commit
bf454bc2ed
@ -788,11 +788,10 @@ nsMsgFolderDataSource::DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSources,
|
||||
nsCOMPtr<nsIRDFLiteral> literal = do_QueryInterface(elem, &rv);
|
||||
if(NS_SUCCEEDED(rv))
|
||||
{
|
||||
PRUnichar *name;
|
||||
literal->GetValue(&name);
|
||||
nsXPIDLString name;
|
||||
literal->GetValue(getter_Copies(name));
|
||||
|
||||
rv = folder->Rename(name,mWindow);
|
||||
PR_FREEIF(name);
|
||||
rv = folder->Rename(name.get(),mWindow);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1990,12 +1989,11 @@ nsresult nsMsgFolderDataSource::DoFolderAssert(nsIMsgFolder *folder, nsIRDFResou
|
||||
nsCOMPtr<nsIRDFLiteral> literal(do_QueryInterface(target));
|
||||
if(literal)
|
||||
{
|
||||
PRUnichar *value;
|
||||
rv = literal->GetValue(&value);
|
||||
nsXPIDLString value;
|
||||
rv = literal->GetValue(getter_Copies(value));
|
||||
if(NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = folder->SetCharset(value);
|
||||
nsMemory::Free(value);
|
||||
rv = folder->SetCharset(value.get());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -428,13 +428,12 @@ nsresult nsMsgNotificationManager::BuildNewMailURI(nsIMsgFolder *folder, nsCAuto
|
||||
if(!folderResource)
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
|
||||
char *folderURI;
|
||||
rv = folderResource->GetValue(&folderURI);
|
||||
const char *folderURI;
|
||||
rv = folderResource->GetValueConst(&folderURI);
|
||||
if(!(NS_SUCCEEDED(rv) && folderURI))
|
||||
return rv;
|
||||
|
||||
newMailURI = "newmail:";
|
||||
newMailURI += folderURI;
|
||||
nsMemory::Free(folderURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user