Mark safe_snprintf and safe_vsnprintf as deprecated, remove uses of them

safe_snprintf and safe_vsnprintf just exist to ensure that the resulting strings are always null-terminated. The documentation for snprintf/vsnprintf states that the output of those methods are always null-terminated, thus making the safe versions obsolete.
This commit is contained in:
Tim Wojtulewicz 2019-12-18 15:58:35 -07:00
parent 6a52857f8f
commit 67fcc9b5af
16 changed files with 31 additions and 29 deletions

View file

@ -136,7 +136,7 @@ const char* fmt_conn_id(const IPAddr& src_addr, uint32_t src_port,
{
static char buffer[512];
safe_snprintf(buffer, sizeof(buffer), "%s:%d > %s:%d",
snprintf(buffer, sizeof(buffer), "%s:%d > %s:%d",
string(src_addr).c_str(), src_port,
string(dst_addr).c_str(), dst_port);