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/UserInfoEx/src/ctrl_contact.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/UserInfoEx/src/ctrl_contact.cpp') diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 8028dbc8a1..438c37dd4e 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -1349,7 +1349,7 @@ int CtrlContactAddMyItemsFromDB( cbi.pszIcon = szIcon; for (i = 0; - SUCCEEDED(mir_snprintf(pszSetting, MAXSETTING, szFormatVal, i)) && + SUCCEEDED(mir_snprintf(pszSetting, SIZEOF(pszSetting), szFormatVal, i)) && (cbi.wFlags = DB::Setting::GetTStringCtrl(hContact, pszModule, pszModule, pszProto, pszSetting, &dbv)); i++) { @@ -1360,7 +1360,7 @@ int CtrlContactAddMyItemsFromDB( dbv.ptszVal = NULL; // read category - if (SUCCEEDED(mir_snprintf(pszSetting, MAXSETTING, szFormatCat, i))) { + if (SUCCEEDED(mir_snprintf(pszSetting, SIZEOF(pszSetting), szFormatCat, i))) { if (cbi.wFlags & CTRLF_HASCUSTOM) { if (DB::Setting::GetTString(hContact, pszModule, pszSetting, &dbv)) dbv.type = DBVT_DELETED; @@ -1480,13 +1480,13 @@ int CtrlContactWriteMyItemsToDB( if (cbi.wFlags & CBEXIF_SMS) { mir_tstrncat(szVal, _T(" SMS"), SIZEOF(szVal)); } - mir_snprintf(pszSetting, MAXSETTING, szFormatCat, i); + mir_snprintf(pszSetting, SIZEOF(pszSetting), szFormatCat, i); if (*szCat && _tcsncmp(szCat, pszOther, ccOther)) { if (db_set_ts(hContact, pszModule, pszSetting, szCat)) return 1; } else db_unset(hContact, pszModule, pszSetting); - mir_snprintf(pszSetting, MAXSETTING, szFormatVal, i); + mir_snprintf(pszSetting, SIZEOF(pszSetting), szFormatVal, i); if (db_set_ts(hContact, pszModule, pszSetting, szVal)) return 1; cbi.wFlags &= ~CTRLF_CHANGED; cbi.wMask = CBEXIM_FLAGS; -- cgit v1.2.3