summaryrefslogtreecommitdiff
path: root/osdep/OSUtils.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-06-27 11:31:29 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-06-27 11:31:29 -0700
commit355cce3938a815feba1085569263ae0225cebfa6 (patch)
treed45f8bf01f9194e4f2e54e615ac4f1c740f344e7 /osdep/OSUtils.cpp
parent02d18af57d7d05d26e44ff2015f5bcf55ebce7a2 (diff)
downloadinfinitytier-355cce3938a815feba1085569263ae0225cebfa6.tar.gz
infinitytier-355cce3938a815feba1085569263ae0225cebfa6.zip
Rename Utils::snprintf due to it being a #define on one platform.
Diffstat (limited to 'osdep/OSUtils.cpp')
-rw-r--r--osdep/OSUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/osdep/OSUtils.cpp b/osdep/OSUtils.cpp
index 53e8bb97..bf0dc04d 100644
--- a/osdep/OSUtils.cpp
+++ b/osdep/OSUtils.cpp
@@ -134,7 +134,7 @@ long OSUtils::cleanDirectory(const char *path,const uint64_t olderThan)
if (date.QuadPart > 0) {
date.QuadPart -= adjust.QuadPart;
if ((uint64_t)((date.QuadPart / 10000000) * 1000) < olderThan) {
- Utils::snprintf(tmp, sizeof(tmp), "%s\\%s", path, ffd.cFileName);
+ Utils::ztsnprintf(tmp, sizeof(tmp), "%s\\%s", path, ffd.cFileName);
if (DeleteFileA(tmp))
++cleaned;
}
@@ -157,7 +157,7 @@ long OSUtils::cleanDirectory(const char *path,const uint64_t olderThan)
break;
if (dptr) {
if ((strcmp(dptr->d_name,"."))&&(strcmp(dptr->d_name,".."))&&(dptr->d_type == DT_REG)) {
- Utils::snprintf(tmp,sizeof(tmp),"%s/%s",path,dptr->d_name);
+ Utils::ztsnprintf(tmp,sizeof(tmp),"%s/%s",path,dptr->d_name);
if (stat(tmp,&st) == 0) {
uint64_t mt = (uint64_t)(st.st_mtime);
if ((mt > 0)&&((mt * 1000) < olderThan)) {
@@ -446,7 +446,7 @@ std::string OSUtils::jsonString(const nlohmann::json &jv,const char *dfl)
return jv;
} else if (jv.is_number()) {
char tmp[64];
- Utils::snprintf(tmp,sizeof(tmp),"%llu",(uint64_t)jv);
+ Utils::ztsnprintf(tmp,sizeof(tmp),"%llu",(uint64_t)jv);
return tmp;
} else if (jv.is_boolean()) {
return ((bool)jv ? std::string("1") : std::string("0"));