From 6d016346f94061cf4bb3f0bd04da98b9568ec452 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 9 Dec 2016 14:01:49 -1000 Subject: [PATCH] Bug 1060419 - make nsWebBrowserPersist.cpp use Printf.h, r=froydnj MozReview-Commit-ID: BaIdoPZqFqg --HG-- extra : rebase_source : 52b71d49bc8cb9a59693ec1e5b79389c2dbd931a --- dom/webbrowserpersist/nsWebBrowserPersist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dom/webbrowserpersist/nsWebBrowserPersist.cpp b/dom/webbrowserpersist/nsWebBrowserPersist.cpp index 4e3d48f371a0..3541b85a1af5 100644 --- a/dom/webbrowserpersist/nsWebBrowserPersist.cpp +++ b/dom/webbrowserpersist/nsWebBrowserPersist.cpp @@ -61,6 +61,7 @@ #include "mozilla/dom/HTMLInputElement.h" #include "mozilla/dom/HTMLSharedElement.h" #include "mozilla/dom/HTMLSharedObjectElement.h" +#include "mozilla/Printf.h" using namespace mozilla; using namespace mozilla::dom; @@ -2021,7 +2022,7 @@ nsWebBrowserPersist::CalculateUniqueFilename(nsIURI *aURI) if (base.IsEmpty() || duplicateCounter > 1) { - char * tmp = PR_smprintf("_%03d", duplicateCounter); + char * tmp = mozilla::Smprintf("_%03d", duplicateCounter); NS_ENSURE_TRUE(tmp, NS_ERROR_OUT_OF_MEMORY); if (filename.Length() < kDefaultMaxFilenameLength - 4) { @@ -2032,7 +2033,7 @@ nsWebBrowserPersist::CalculateUniqueFilename(nsIURI *aURI) base.Mid(tmpBase, 0, base.Length() - 4); } tmpBase.Append(tmp); - PR_smprintf_free(tmp); + mozilla::SmprintfFree(tmp); } else {