From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SMS/src/receive.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/SMS/src/receive.cpp') diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index bc37fe89f3..84eb7cae6e 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -152,10 +152,10 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam) tvi.mask=TVIF_TEXT; tvi.hItem=SendSMSWindowHItemSendGet(hWndDlg); tvi.pszText=tszPhone; - tvi.cchTextMax=SIZEOF(tszPhone); + tvi.cchTextMax=_countof(tszPhone); TreeView_GetItem(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),&tvi); } - else GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,SIZEOF(szPhone)); + else GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,_countof(szPhone)); if (ack->result == ACKRESULT_FAILED) lpszErrorDescription=lpszXML; @@ -164,7 +164,7 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam) GetXMLFieldExBuff(lpszXML,dwXMLSize,szBuff,sizeof(szBuff),NULL,"sms_response","error","params","param",NULL); } - mir_sntprintf(tszErrorMessage,SIZEOF(tszErrorMessage),TranslateT("SMS message didn't send by %S to %s because: %S"),szNetwork,tszPhone,lpszErrorDescription); + mir_sntprintf(tszErrorMessage,_countof(tszErrorMessage),TranslateT("SMS message didn't send by %S to %s because: %S"),szNetwork,tszPhone,lpszErrorDescription); ShowWindow(hWndDlg,SW_SHOWNORMAL); EnableWindow(hWndDlg,FALSE); HWND hwndTimeOut=CreateDialog(ssSMSSettings.hInstance,MAKEINTRESOURCE(IDD_SENDSMSTIMEDOUT),hWndDlg,SMSTimedOutDlgProc); @@ -238,7 +238,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) } else { memcpy(pszServiceFunctionName,SMS_READ,sizeof(SMS_READ)); - mir_sntprintf(szToolTip,SIZEOF(szToolTip),TranslateT("SMS Message from %s"),GetContactNameW(hContact)); + mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Message from %s"),GetContactNameW(hContact)); CLISTEVENT cle = { sizeof(cle) }; cle.flags = CLEF_TCHAR; @@ -261,7 +261,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) UINT iIcon; if (GetDataFromMessage((LPSTR)dbei.pBlob, dbei.cbBlob, NULL, NULL, 0, NULL, &iIcon)) { memcpy(pszServiceFunctionName,SMS_READ_ACK,sizeof(SMS_READ_ACK)); - mir_sntprintf(szToolTip,SIZEOF(szToolTip),TranslateT("SMS Confirmation from %s"),GetContactNameW(hContact)); + mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Confirmation from %s"),GetContactNameW(hContact)); CLISTEVENT cle = { sizeof(cle) }; cle.flags = CLEF_TCHAR; -- cgit v1.2.3