Remove UTIL_Format() and UTIL_VarArgs()

This commit is contained in:
Arkshine
2015-10-01 11:06:04 +02:00
parent f22dc769f4
commit 138b9e1510
39 changed files with 112 additions and 173 deletions

View File

@ -192,7 +192,7 @@ bool loadDatabase()
// MF_BuildPathname not used because backslash
// makes CreateFileMapping failing under windows.
UTIL_Format(file, sizeof(file) - 1, "%s/%s/GeoLite2-%s.mmdb", modName, dataDir, databases[i]);
ke::SafeSprintf(file, sizeof(file) - 1, "%s/%s/GeoLite2-%s.mmdb", modName, dataDir, databases[i]);
status = MMDB_open(file, MMDB_MODE_MMAP, &HandleDB);

View File

@ -157,7 +157,7 @@ static cell AMX_NATIVE_CALL amx_geoip_region_code(AMX *amx, cell *params)
if (countryCode)
{
finalLength = length + 1; // + 1 for dash.
UTIL_Format(code, finalLength + 1, "%s-", countryCode); // + EOS.
ke::SafeSprintf(code, finalLength + 1, "%s-", countryCode); // + EOS.
const char *pathRegion[] = { "subdivisions", "0", "iso_code", NULL }; // First result.
const char *regionCode = lookupString(ip, pathRegion, &length);