replace usage of itoa with snprintf
This commit is contained in:
parent
68e5833647
commit
f01609c5aa
|
@ -44,9 +44,9 @@ int FinalizationPass::Run(HIRBuilder* builder) {
|
||||||
auto label = block->label_head;
|
auto label = block->label_head;
|
||||||
while (label) {
|
while (label) {
|
||||||
if (!label->name) {
|
if (!label->name) {
|
||||||
char* name = (char*)arena->Alloc(6 + 4 + 1);
|
const size_t label_len = 6 + 4 + 1;
|
||||||
xestrcpya(name, 6 + 1, "_label");
|
char* name = (char*)arena->Alloc(label_len);
|
||||||
char* part = _itoa(label->id, name + 6, 10);
|
xesnprintf(name, label_len, "_label%d", label->id);
|
||||||
label->name = name;
|
label->name = name;
|
||||||
}
|
}
|
||||||
label = label->next;
|
label = label->next;
|
||||||
|
|
Loading…
Reference in New Issue