From c370af60855db957c5b200914bf0bde743845528 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 28 Aug 2015 16:22:41 +0000 Subject: 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 --- plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 10 +++++----- plugins/StatusPlugins/KeepStatus/options.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/StatusPlugins/KeepStatus') diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 36e379aa59..c72083e891 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -213,7 +213,7 @@ static int AssignStatus(TConnectionSettings* cs, int status, int lastStatus, TCH mir_cslock lck(GenStatusCS); char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", cs->szName); + mir_snprintf(dbSetting, "%s_enabled", cs->szName); cs->lastStatus = lastStatus == 0 ? cs->status : lastStatus; if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) cs->status = ID_STATUS_DISABLED; @@ -521,7 +521,7 @@ static int ProcessProtoAck(WPARAM, LPARAM lParam) return 0; char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", ack->szModule); + mir_snprintf(dbSetting, "%s_enabled", ack->szModule); if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) return 0; @@ -934,7 +934,7 @@ static int ProcessPopup(int reason, LPARAM lParam) for (int i = 0; i < connectionSettings.getCount(); i++) { if (mir_tstrlen(ps[i]->tszAccName) > 0 && mir_strlen(ps[i]->szName) > 0) { if (db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) { - mir_sntprintf(protoInfoLine, _countof(protoInfoLine), TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, 0)); + mir_sntprintf(protoInfoLine, TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, 0)); mir_tstrncat(protoInfo, protoInfoLine, _countof(protoInfo) - mir_tstrlen(protoInfo) - 1); } } @@ -1052,7 +1052,7 @@ INT_PTR EnableProtocolService(WPARAM wParam, LPARAM lParam) return -1; char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", szProto); + mir_snprintf(dbSetting, "%s_enabled", szProto); if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) // 'hard' disabled return -1; @@ -1078,7 +1078,7 @@ INT_PTR IsProtocolEnabledService(WPARAM, LPARAM lParam) char *szProto = (char *)lParam; char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", szProto); + mir_snprintf(dbSetting, "%s_enabled", szProto); if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) return FALSE; diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index 5cafcaadbf..effa88cf8a 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -72,7 +72,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam ListView_InsertItem(hList, &lvItem); char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", protos[i]->szModuleName); + mir_snprintf(dbSetting, "%s_enabled", protos[i]->szModuleName); ListView_SetCheckState(hList, lvItem.iItem, db_get_b(NULL, MODULENAME, dbSetting, TRUE)); lvItem.iItem++; } @@ -153,7 +153,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam ListView_GetItem(hList, &lvItem); char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", (char *)lvItem.lParam); + mir_snprintf(dbSetting, "%s_enabled", (char *)lvItem.lParam); db_set_b(NULL, MODULENAME, dbSetting, (BYTE)ListView_GetCheckState(hList, lvItem.iItem)); } } -- cgit v1.2.3