From 13eb83bea655c3302c74a82d826d75bceb9232a2 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Mon, 8 Dec 2014 22:13:57 +0000 Subject: code cleanup around mir_snprintf git-svn-id: http://svn.miranda-ng.org/main/trunk@11285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TipperYM/src/translations.cpp | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'plugins/TipperYM/src/translations.cpp') diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 4b3050ce9e..fa37d0cb99 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -247,21 +247,21 @@ TCHAR *DayMonthYearToDate(MCONTACT hContact, const char *szModuleName, const cha { DBVARIANT dbv; char szSettingName[256]; - mir_snprintf(szSettingName, 256, "%sDay", prefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sDay", prefix); if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { int day = 0; if (GetInt(dbv, &day)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sMonth", prefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sMonth", prefix); int month = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { if (GetInt(dbv, &month)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sYear", prefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sYear", prefix); int year = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { @@ -295,21 +295,21 @@ TCHAR *DayMonthYearToAge(MCONTACT hContact, const char *szModuleName, const char { DBVARIANT dbv; char szSettingName[256]; - mir_snprintf(szSettingName, 256, "%sDay", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sDay", szPrefix); if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { int day = 0; if (GetInt(dbv, &day)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sMonth", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sMonth", szPrefix); int month = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { if (GetInt(dbv, &month)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sYear", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sYear", szPrefix); int year = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { @@ -344,21 +344,21 @@ TCHAR *HoursMinutesSecondsToTime(MCONTACT hContact, const char *szModuleName, co { DBVARIANT dbv; char szSettingName[256]; - mir_snprintf(szSettingName, 256, "%sHours", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sHours", szPrefix); if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { int hours = 0; if (GetInt(dbv, &hours)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sMinutes", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sMinutes", szPrefix); int minutes = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { if (GetInt(dbv, &minutes)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sSeconds", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sSeconds", szPrefix); int seconds = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { @@ -388,14 +388,14 @@ TCHAR *HoursMinutesToTime(MCONTACT hContact, const char *szModuleName, const cha { DBVARIANT dbv; char szSettingName[256]; - mir_snprintf(szSettingName, 256, "%sHours", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sHours", szPrefix); if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { int hours = 0; if (GetInt(dbv, &hours)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sMinutes", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sMinutes", szPrefix); int minutes = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { @@ -424,42 +424,42 @@ TCHAR *DmyToTimeDifference(MCONTACT hContact, const char *szModuleName, const ch { DBVARIANT dbv; char szSettingName[256]; - mir_snprintf(szSettingName, 256, "%sDay", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sDay", szPrefix); if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { int day = 0; if (GetInt(dbv, &day)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sMonth", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sMonth", szPrefix); int month = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { if (GetInt(dbv, &month)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sYear", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sYear", szPrefix); int year = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { if (GetInt(dbv, &year)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sHours", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sHours", szPrefix); if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { int hours = 0; if (GetInt(dbv, &hours)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sMinutes", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sMinutes", szPrefix); int minutes = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { if (GetInt(dbv, &minutes)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sSeconds", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sSeconds", szPrefix); int seconds = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { @@ -526,14 +526,14 @@ TCHAR *DayMonthToDaysToNextBirthday(MCONTACT hContact, const char *szModuleName, { DBVARIANT dbv; char szSettingName[256]; - mir_snprintf(szSettingName, 256, "%sDay", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sDay", szPrefix); if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { int day = 0; if (GetInt(dbv, &day)) { db_free(&dbv); - mir_snprintf(szSettingName, 256, "%sMonth", szPrefix); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sMonth", szPrefix); int month = 0; if (!db_get(hContact, szModuleName, szSettingName, &dbv)) { -- cgit v1.2.3