From 87e4e443740bc5fdc9f4c13bf67b673429e3142e Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Fri, 28 Jan 2000 09:56:55 +0000 Subject: [PATCH] fix warnings and fix a leak. also, call MigrateProfileInfo() otherwise, the list of profiles won't show up the first time we run -ProfileManager --- profile/src/nsProfile.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/profile/src/nsProfile.cpp b/profile/src/nsProfile.cpp index 76fdb897fa53..799cc3c51ce4 100644 --- a/profile/src/nsProfile.cpp +++ b/profile/src/nsProfile.cpp @@ -443,6 +443,9 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs, printf("Profile Manager : Command Line Options : Begin\n"); #endif + rv = MigrateProfileInfo(); + if (NS_FAILED(rv)) return rv; + // check for command line arguments for profile manager // // -P command line option works this way: @@ -549,9 +552,6 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs, if (NS_SUCCEEDED(rv)) { if (cmdResult) { - rv = MigrateProfileInfo(); - if (NS_FAILED(rv)) return rv; - PRInt32 num4xProfiles = 0; rv = Get4xProfileCount(&num4xProfiles); if (NS_FAILED(rv)) return rv; @@ -1333,7 +1333,6 @@ NS_IMETHODIMP nsProfile::ProcessPREGInfo(const char* data) gProfileDataAccess->GetValue(userProfileName.ToNewCString(), &aProfile); - PRInt32 length = PL_strlen(userProfileName.ToNewCString()); aProfile->NCProfileName = nsCRT::strdup(userProfileName.ToNewCString()); gProfileDataAccess->SetValue(aProfile); @@ -1346,7 +1345,6 @@ NS_IMETHODIMP nsProfile::ProcessPREGInfo(const char* data) gProfileDataAccess->GetValue(curProfile, &aProfile); - PRInt32 length = PL_strlen(userServiceDenial.ToNewCString()); aProfile->NCDeniedService = nsCRT::strdup(userServiceDenial.ToNewCString()); gProfileDataAccess->SetValue(aProfile);