Cleanup: do not use strcat().

This commit is contained in:
Jan Vidar Krey
2011-12-09 15:58:58 +01:00
parent 41824ce2bf
commit 1dc79c641c
2 changed files with 54 additions and 59 deletions

View File

@@ -293,7 +293,8 @@ const char* uhub_itoa(int val)
memset(buf, 0, sizeof(buf));
if (!val)
{
strcat(buf, "0");
buf[0] = '0';
buf[1] = '\0';
return buf;
}
i = sizeof(buf) - 1;
@@ -314,7 +315,8 @@ const char* uhub_ulltoa(uint64_t val)
if (!val)
{
strcat(buf, "0");
buf[0] = '0';
buf[1] = '\0';
return buf;
}
i = sizeof(buf) - 1;