зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1060419 - make nsEnvironment.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: 9GnlfmGm0LH --HG-- extra : rebase_source : 2cbf3cccd3fd7b9584086a814a0f834267c5b2f9
This commit is contained in:
Родитель
b18d4c7b9e
Коммит
6ecf3cdfb2
|
@ -6,12 +6,12 @@
|
|||
|
||||
#include "nsEnvironment.h"
|
||||
#include "prenv.h"
|
||||
#include "prprf.h"
|
||||
#include "nsBaseHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsPromiseFlatString.h"
|
||||
#include "nsDependentString.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
#include "mozilla/Printf.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -145,16 +145,16 @@ nsEnvironment::Set(const nsAString& aName, const nsAString& aValue)
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
char* newData = PR_smprintf("%s=%s",
|
||||
nativeName.get(),
|
||||
nativeVal.get());
|
||||
char* newData = mozilla::Smprintf("%s=%s",
|
||||
nativeName.get(),
|
||||
nativeVal.get());
|
||||
if (!newData) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
PR_SetEnv(newData);
|
||||
if (entry->mData) {
|
||||
PR_smprintf_free(entry->mData);
|
||||
mozilla::SmprintfFree(entry->mData);
|
||||
}
|
||||
entry->mData = newData;
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче