mesa|mapi: replace _mesa_[v]snprintf with [v]snprintf

MSVC 2015 and newer has perfectly valid snprintf and vsnprintf
implementations, let's just use those.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
This commit is contained in:
Dylan Baker
2019-12-09 10:54:16 -08:00
parent c495c3af26
commit bf188f3494
18 changed files with 44 additions and 78 deletions
+2 -1
View File
@@ -50,6 +50,7 @@ class PrintGlEnums(gl_XML.gl_print_base):
def printRealHeader(self):
print('#include <stdio.h>')
print('#include "main/glheader.h"')
print('#include "main/enums.h"')
print('#include "util/imports.h"')
@@ -103,7 +104,7 @@ _mesa_enum_to_string(int nr)
}
else {
/* this is not re-entrant safe, no big deal here */
_mesa_snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr);
snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr);
token_tmp[sizeof(token_tmp) - 1] = '\\0';
return token_tmp;
}