summaryrefslogtreecommitdiff
path: root/plugins/Variables/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
commitc370af60855db957c5b200914bf0bde743845528 (patch)
tree0bd2ef127097c9e937c2650e8b202c3f09453323 /plugins/Variables/src
parent7f082bd5d4865c30b313661b7a02f048b4b137be (diff)
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src')
-rw-r--r--plugins/Variables/src/dbhelpers.h18
-rw-r--r--plugins/Variables/src/parse_inet.cpp2
-rw-r--r--plugins/Variables/src/parse_math.cpp2
-rw-r--r--plugins/Variables/src/parse_metacontacts.cpp6
-rw-r--r--plugins/Variables/src/parse_miranda.cpp2
-rw-r--r--plugins/Variables/src/parse_system.cpp6
6 files changed, 18 insertions, 18 deletions
diff --git a/plugins/Variables/src/dbhelpers.h b/plugins/Variables/src/dbhelpers.h
index b6fe9f7c42..4531bf397f 100644
--- a/plugins/Variables/src/dbhelpers.h
+++ b/plugins/Variables/src/dbhelpers.h
@@ -26,7 +26,7 @@ static int __inline DBWriteIthSettingByte(DWORD i, MCONTACT hContact,const char
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_set_b(hContact, szModule, dbSetting, val);
}
@@ -34,7 +34,7 @@ static int __inline DBWriteIthSettingWord(DWORD i, MCONTACT hContact,const char
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_set_w(hContact, szModule, dbSetting, val);
}
@@ -42,7 +42,7 @@ static int __inline DBWriteIthSettingDword(DWORD i, MCONTACT hContact,const char
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_set_dw(hContact, szModule, dbSetting, val);
}
@@ -50,7 +50,7 @@ static int __inline DBWriteIthSettingString(DWORD i, MCONTACT hContact,const cha
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_set_s(hContact, szModule, dbSetting, val);
}
@@ -59,7 +59,7 @@ static int __inline DBGetIthSettingByte(DWORD i, MCONTACT hContact, const char *
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_get_b(hContact, szModule, dbSetting, errorValue);
}
@@ -68,7 +68,7 @@ static WORD __inline DBGetIthSettingWord(DWORD i, MCONTACT hContact, const char
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_get_w(hContact, szModule, dbSetting, errorValue);
}
@@ -77,7 +77,7 @@ static DWORD __inline DBGetIthSettingDword(DWORD i, MCONTACT hContact, const cha
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_get_dw(hContact, szModule, dbSetting, errorValue);
}
@@ -86,7 +86,7 @@ static int __inline DBGetIthSetting(DWORD i, MCONTACT hContact, const char *szMo
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_get(hContact, szModule, dbSetting, dbv);
}
@@ -94,7 +94,7 @@ static int __inline DBDeleteIthSetting(DWORD i, MCONTACT hContact,const char *sz
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%u_%s", PREFIX_ITH, i, szSetting);
+ mir_snprintf(dbSetting, "%s%u_%s", PREFIX_ITH, i, szSetting);
return db_unset(hContact, szModule, dbSetting);
}
diff --git a/plugins/Variables/src/parse_inet.cpp b/plugins/Variables/src/parse_inet.cpp
index ff3e07c943..59d3cc4ce8 100644
--- a/plugins/Variables/src/parse_inet.cpp
+++ b/plugins/Variables/src/parse_inet.cpp
@@ -40,7 +40,7 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai)
char hex[8];
memmove(res + cur + 3, res + cur + 1, mir_strlen(res + cur + 1) + 1);
- mir_snprintf(hex, _countof(hex), "%%%x", *(res + cur));
+ mir_snprintf(hex, "%%%x", *(res + cur));
strncpy(res + cur, hex, mir_strlen(hex));
cur += mir_strlen(hex);
}
diff --git a/plugins/Variables/src/parse_math.cpp b/plugins/Variables/src/parse_math.cpp
index 1308f805e2..d71296a93d 100644
--- a/plugins/Variables/src/parse_math.cpp
+++ b/plugins/Variables/src/parse_math.cpp
@@ -54,7 +54,7 @@ static TCHAR *parseHex(ARGUMENTSINFO *ai)
int val = ttoi(ai->targv[1]);
int padding = ttoi(ai->targv[2]);
- mir_sntprintf(szVal, _countof(szVal), _T("%x"), val);
+ mir_sntprintf(szVal, _T("%x"), val);
unsigned int zeros = max(padding - (signed int)mir_tstrlen(szVal), 0);
TCHAR *res = (TCHAR*)mir_alloc((zeros + mir_tstrlen(szVal) + 3)*sizeof(TCHAR));
if (res == NULL)
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp
index f8a965b81c..bbe87a9506 100644
--- a/plugins/Variables/src/parse_metacontacts.cpp
+++ b/plugins/Variables/src/parse_metacontacts.cpp
@@ -51,7 +51,7 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _countof(tszID), _T("%p"), hContact);
+ mir_sntprintf(tszID, _T("%p"), hContact);
szUniqueID = mir_tstrdup(tszID);
}
@@ -91,7 +91,7 @@ static TCHAR *parseGetDefault(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _countof(tszID), _T("%p"), hContact);
+ mir_sntprintf(tszID, _T("%p"), hContact);
szUniqueID = mir_tstrdup(tszID);
}
@@ -131,7 +131,7 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _countof(tszID), _T("%p"), hContact);
+ mir_sntprintf(tszID, _T("%p"), hContact);
szUniqueID = mir_tstrdup(tszID);
}
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index 1877bfcf3f..598fc4dd6d 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -723,7 +723,7 @@ static TCHAR *parseMirandaCoreVar(ARGUMENTSINFO *ai)
ai->flags |= AIF_DONTPARSE;
TCHAR corevar[MAX_PATH];
- mir_sntprintf(corevar, _countof(corevar), _T("%%%s%%"), ai->targv[0]);
+ mir_sntprintf(corevar, _T("%%%s%%"), ai->targv[0]);
return Utils_ReplaceVarsT(corevar);
}
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp
index df01089e48..9e92647542 100644
--- a/plugins/Variables/src/parse_system.cpp
+++ b/plugins/Variables/src/parse_system.cpp
@@ -105,7 +105,7 @@ static TCHAR *parseCpuLoad(ARGUMENTSINFO *ai)
pdhStatus = PdhCloseQuery(hQuery);
return NULL;
}
- mir_sntprintf(szVal, _countof(szVal), _T("%.0f"), cValue.doubleValue);
+ mir_sntprintf(szVal, _T("%.0f"), cValue.doubleValue);
//PdhRemoveCounter(*hCounter);
PdhCloseQuery(hQuery);
mir_free(szCounter);
@@ -282,7 +282,7 @@ static TCHAR *parseDiffTime(ARGUMENTSINFO *ai)
return NULL;
diff = difftime(mktime(&t1), mktime(&t0));
- mir_sntprintf(szTime, _countof(szTime), _T("%.0f"), diff);
+ mir_sntprintf(szTime, _T("%.0f"), diff);
return mir_tstrdup(szTime);
}
@@ -819,7 +819,7 @@ static TCHAR *parseUpTime(ARGUMENTSINFO *ai)
}
TCHAR szVal[32];
- mir_sntprintf(szVal, _countof(szVal), _T("%u"), cValue.largeValue);
+ mir_sntprintf(szVal, _T("%u"), cValue.largeValue);
PdhRemoveCounter(hCounter);
PdhCloseQuery(hQuery);
return mir_tstrdup(szVal);