clean up some string usage. rs=mscott

This commit is contained in:
sspitzer%netscape.com 2002-01-26 16:36:30 +00:00
parent d04902ac6d
commit bf454bc2ed
2 changed files with 8 additions and 11 deletions

View File

@ -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

View File

@ -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;
}