diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 00:07:01 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 00:07:01 +0000 |
commit | b2fad485cd5b41744ef0cc4a02722c021afd926c (patch) | |
tree | aa19403cd699066600e8306be8ad33e4a17fba6f /plugins/Clist_nicer/src/clcitems.cpp | |
parent | fc62f1f1e1f8af40a1f7efe0ba3afc358fb66ef3 (diff) |
ZeroMemory -> memset, few bugs fised
git-svn-id: http://svn.miranda-ng.org/main/trunk@11184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/clcitems.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 94de708bef..2edc82614f 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -32,7 +32,7 @@ ClcContact* CreateClcContact( void ) {
ClcContact* p = (ClcContact*)mir_alloc( sizeof( ClcContact ));
if ( p != NULL ) {
- ZeroMemory(p, sizeof(ClcContact));
+ memset(p, 0, sizeof(ClcContact));
p->avatarLeft = p->extraIconRightBegin = p->xStatusIcon = -1;
}
return p;
@@ -160,7 +160,7 @@ void RebuildEntireList(HWND hwnd, struct ClcData *dat) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (style & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus(hContact, NULL, dat)) {
- ZeroMemory((void *)&dbv, sizeof(dbv));
+ memset(&dbv, 0, sizeof(dbv));
if (cfg::getTString(hContact, "CList", "Group", &dbv))
group = &dat->list;
else {
@@ -290,7 +290,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) if (p->bStatusMsgValid != STATUSMSG_NOTFOUND) {
WORD infoTypeC2[12];
- ZeroMemory(infoTypeC2, sizeof(WORD) * 12);
+ memset(infoTypeC2, 0, sizeof(infoTypeC2));
int iLen = min(mir_wstrlen(p->statusMsg), 10);
GetStringTypeW(CT_CTYPE2, p->statusMsg, iLen, infoTypeC2);
p->dwCFlags &= ~ECF_RTLSTATUSMSG;
@@ -350,7 +350,7 @@ void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact) DWORD iLen;
TExtraCache *p;
- ZeroMemory(infoTypeC2, sizeof(WORD) * 12);
+ memset(infoTypeC2, 0, sizeof(infoTypeC2));
if (contact == NULL) {
szText = pcli->pfnGetContactDisplayName(hContact, 0);
@@ -425,7 +425,7 @@ void LoadSkinItemToCache(TExtraCache *cEntry, const char *szProto) if (cfg::getByte(hContact, "EXTBK", "VALID", 0)) {
if (cEntry->status_item == NULL)
cEntry->status_item = reinterpret_cast<StatusItems_t *>(malloc(sizeof(StatusItems_t)));
- ZeroMemory(cEntry->status_item, sizeof(StatusItems_t));
+ memset(cEntry->status_item, 0, sizeof(StatusItems_t));
strcpy(cEntry->status_item->szName, "{--CONTACT--}"); // mark as "per contact" item
cEntry->status_item->IGNORED = 0;
|