Bug 1197306 - remove PR_snprintf calls in ipc/; r=froydnj

This commit is contained in:
chaithanya 2015-12-14 13:32:56 -05:00
parent 9fc33ccd15
commit 4482e6ef5c
2 changed files with 7 additions and 11 deletions

View File

@ -18,7 +18,7 @@
#endif
#include "MainThreadUtils.h"
#include "prprf.h"
#include "mozilla/Snprintf.h"
#include "prenv.h"
#include "nsXPCOMPrivate.h"
@ -617,8 +617,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
// send the child the PID so that it can open a ProcessHandle back to us.
// probably don't want to do this in the long run
char pidstring[32];
PR_snprintf(pidstring, sizeof(pidstring) - 1,
"%ld", base::Process::Current().pid());
snprintf_literal(pidstring,"%d", base::Process::Current().pid());
const char* const childProcessType =
XRE_ChildProcessTypeToString(mProcessType);

View File

@ -18,8 +18,7 @@
#include "nsDebug.h"
#include "nsISupportsImpl.h"
#include "nsContentUtils.h"
#include "prprf.h"
#include "mozilla/Snprintf.h"
// Undo the damage done by mozzconf.h
#undef compress
@ -1691,9 +1690,8 @@ MessageChannel::ReportConnectionError(const char* aChannelName, Message* aMsg) c
if (aMsg) {
char reason[512];
PR_snprintf(reason, sizeof(reason),
"(msgtype=0x%lX,name=%s) %s",
aMsg->type(), aMsg->name(), errorMsg);
snprintf_literal(reason,"(msgtype=0x%X,name=%s) %s",
aMsg->type(), aMsg->name(), errorMsg);
PrintErrorMessage(mSide, aChannelName, reason);
} else {
@ -1737,9 +1735,8 @@ MessageChannel::MaybeHandleError(Result code, const Message& aMsg, const char* c
}
char reason[512];
PR_snprintf(reason, sizeof(reason),
"(msgtype=0x%lX,name=%s) %s",
aMsg.type(), aMsg.name(), errorMsg);
snprintf_literal(reason,"(msgtype=0x%X,name=%s) %s",
aMsg.type(), aMsg.name(), errorMsg);
PrintErrorMessage(mSide, channelName, reason);