Bug 1197313 - remove PR_snprintf calls in netwerk/; r=froydnj

This commit is contained in:
Madhurima
2015-10-29 16:07:44 -04:00
parent c74503034d
commit dd31bb522c
6 changed files with 19 additions and 15 deletions

View File

@@ -7,6 +7,9 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/Attributes.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Snprintf.h"
#include "nsCache.h"
#include "nsDiskCache.h"
#include "nsDiskCacheDeviceSQL.h"
@@ -411,7 +414,7 @@ nsOfflineCacheBinding::Create(nsIFile *cacheDir,
for (generation = 0; ; ++generation)
{
PR_snprintf(leaf, sizeof(leaf), "%014llX-%X", hash, generation);
snprintf_literal(leaf, "%014" PRIx64 "-%X", hash, generation);
rv = file->SetNativeLeafName(nsDependentCString(leaf));
if (NS_FAILED(rv))
@@ -425,7 +428,7 @@ nsOfflineCacheBinding::Create(nsIFile *cacheDir,
}
else
{
PR_snprintf(leaf, sizeof(leaf), "%014llX-%X", hash, generation);
snprintf_literal(leaf, "%014" PRIx64 "-%X", hash, generation);
rv = file->AppendNative(nsDependentCString(leaf));
if (NS_FAILED(rv))
return nullptr;