Bug 1228051 - Remove PR_snprintf calls in nsCSSParser.cpp's CSSParserImpl::ParseColor. r=dholbert

This commit is contained in:
Anup Kumar 2015-11-26 03:19:00 +01:00
parent 9e9d5afbb0
commit 54598822a8

View File

@ -41,7 +41,7 @@
#include "nsStyleUtil.h"
#include "nsIPrincipal.h"
#include "nsICSSUnprefixingService.h"
#include "prprf.h"
#include "mozilla/Snprintf.h"
#include "nsContentUtils.h"
#include "nsAutoPtr.h"
#include "CSSCalc.h"
@ -6599,14 +6599,14 @@ CSSParserImpl::ParseColor(nsCSSValue& aValue)
case eCSSToken_Number:
if (tk->mIntegerValid) {
PR_snprintf(buffer, sizeof(buffer), "%06d", tk->mInteger);
snprintf_literal(buffer, "%06d", tk->mInteger);
str.AssignWithConversion(buffer);
}
break;
case eCSSToken_Dimension:
if (tk->mIdent.Length() <= 6) {
PR_snprintf(buffer, sizeof(buffer), "%06.0f", tk->mNumber);
snprintf_literal(buffer, "%06.0f", tk->mNumber);
nsAutoString temp;
temp.AssignWithConversion(buffer);
temp.Right(str, 6 - tk->mIdent.Length());