final patch for bug 234908 "getter_Copies scoping problem" r+sr=dbaron

This commit is contained in:
darin%meer.net 2004-03-08 23:48:39 +00:00
Родитель 92e13337aa
Коммит 8bdaba45ad
5 изменённых файлов: 16 добавлений и 10 удалений

Просмотреть файл

@ -94,8 +94,8 @@ NS_IMETHODIMP nsIDNService::Observe(nsISupports *aSubject,
}
else if (NS_LITERAL_STRING(NS_NET_PREF_IDNPREFIX).Equals(aData)) {
nsXPIDLCString prefix;
if (NS_SUCCEEDED(prefBranch->GetCharPref(NS_NET_PREF_IDNPREFIX, getter_Copies(prefix))) &&
prefix.Length() <= kACEPrefixLen)
nsresult rv = prefBranch->GetCharPref(NS_NET_PREF_IDNPREFIX, getter_Copies(prefix));
if (NS_SUCCEEDED(rv) && prefix.Length() <= kACEPrefixLen)
PL_strncpyz(nsIDNService::mACEPrefix, prefix.get(), kACEPrefixLen + 1);
}
}

Просмотреть файл

@ -921,8 +921,10 @@ static nsresult InitializeProfileService(nsICmdLineService *cmdLineArgs)
// If we were launched with -silent, we cannot show UI, either.
if (shouldShowUI) {
nsXPIDLCString arg;
if (NS_SUCCEEDED(cmdLineArgs->GetCmdLineValue("-silent", getter_Copies(arg))) && (const char*)arg) {
shouldShowUI = PR_FALSE;
if (NS_SUCCEEDED(cmdLineArgs->GetCmdLineValue("-silent", getter_Copies(arg)))) {
if ((const char*)arg) {
shouldShowUI = PR_FALSE;
}
}
}
nsresult rv;

Просмотреть файл

@ -2142,8 +2142,10 @@ nsNativeAppSupportOS2::EnsureProfile(nsICmdLineService* args)
// See if profile manager is being suppressed via -silent flag.
PRBool canInteract = PR_TRUE;
nsXPIDLCString arg;
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg))) && (const char*)arg) {
canInteract = PR_FALSE;
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg)))) {
if ((const char*)arg) {
canInteract = PR_FALSE;
}
}
rv = appShell->DoProfileStartup(args, canInteract);

Просмотреть файл

@ -2108,8 +2108,10 @@ printf( "Setting ddexec subkey entries\n" );
// See if profile manager is being suppressed via -silent flag.
PRBool canInteract = PR_TRUE;
nsXPIDLCString arg;
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg))) && (const char*)arg) {
canInteract = PR_FALSE;
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg)))) {
if ((const char*)arg) {
canInteract = PR_FALSE;
}
}
rv = appShell->DoProfileStartup(args, canInteract);

Просмотреть файл

@ -1698,8 +1698,8 @@ nsBookmarksService::Init()
// determine what the name of the Personal Toolbar Folder is...
// first from user preference, then string bundle, then hard-coded default
nsXPIDLCString prefValue;
if (NS_SUCCEEDED(rv = prefBranch->GetCharPref("custtoolbar.personal_toolbar_folder", getter_Copies(prefValue))
&& !prefValue.IsEmpty()))
rv = prefBranch->GetCharPref("custtoolbar.personal_toolbar_folder", getter_Copies(prefValue));
if (NS_SUCCEEDED(rv) && !prefValue.IsEmpty())
{
CopyUTF8toUTF16(prefValue, mPersonalToolbarName);
}