Silenced compiler warning related to sprintf() usage.

git-svn-id: http://voip.null.ro/svn/yate@6566 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2022-10-11 08:13:58 +00:00
parent 06f225431e
commit ac82b37198
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ using namespace TelEngine;
// Ensure response code string representation is 3 digit long
inline void setCode(String& dest, unsigned int code)
{
if (code >= 1000) {
dest = "999";
return;
}
char c[4];
sprintf(c,"%03u",code);
dest = c;