From f01609c5aa69cc24519f6b61686fb0bc22bae85a Mon Sep 17 00:00:00 2001 From: Anthony Pesch Date: Wed, 14 May 2014 00:14:56 -0700 Subject: [PATCH] replace usage of itoa with snprintf --- src/alloy/compiler/passes/finalization_pass.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/alloy/compiler/passes/finalization_pass.cc b/src/alloy/compiler/passes/finalization_pass.cc index 3fa3fc1b6..9a430ecc1 100644 --- a/src/alloy/compiler/passes/finalization_pass.cc +++ b/src/alloy/compiler/passes/finalization_pass.cc @@ -44,9 +44,9 @@ int FinalizationPass::Run(HIRBuilder* builder) { auto label = block->label_head; while (label) { if (!label->name) { - char* name = (char*)arena->Alloc(6 + 4 + 1); - xestrcpya(name, 6 + 1, "_label"); - char* part = _itoa(label->id, name + 6, 10); + const size_t label_len = 6 + 4 + 1; + char* name = (char*)arena->Alloc(label_len); + xesnprintf(name, label_len, "_label%d", label->id); label->name = name; } label = label->next;