diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-06-16 10:31:24 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-06-16 10:31:24 +0000 |
commit | 2e5f5f0cca1b5d249a05971f0f7e7e0de11da251 (patch) | |
tree | ca9fa25900c18775ced417030efd902c0a01ec89 | |
parent | 0a720dfc2ba0b1b2bfe6a23ea3639aea2ddff013 (diff) |
small fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@14191 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 55f4cdf575..98c6e34c68 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -642,7 +642,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) if (p == NULL) {
p = (logthread_info*)mir_calloc(sizeof(logthread_info));
p->hContact = hContact;
- strncpy(p->sProtoName, cws->szModule, MAXMODULELABELLENGTH);
+ mir_strncpy(p->sProtoName, cws->szModule, SIZEOF(p->sProtoName));
arContacts.insert(p);
mir_forkthread(waitThread, p);
}
@@ -675,7 +675,7 @@ static void cleanThread(void *param) mir_snprintf(str, "OffTime-%s", infoParam->sProtoName);
db_unset(NULL, S_MOD, str);
}
- free(infoParam);
+ mir_free(infoParam);
}
int ModeChange(WPARAM wparam, LPARAM lparam)
@@ -696,8 +696,8 @@ int ModeChange(WPARAM wparam, LPARAM lparam) //we have just loged-in
db_set_dw(NULL, "UserOnline", ack->szModule, GetTickCount());
if (!Miranda_Terminated() && IsWatchedProtocol(ack->szModule)) {
- logthread_info *info = (logthread_info *)malloc(sizeof(logthread_info));
- strncpy(info->sProtoName, courProtoName, MAXMODULELABELLENGTH);
+ logthread_info *info = (logthread_info *)mir_alloc(sizeof(logthread_info));
+ mir_strncpy(info->sProtoName, courProtoName, SIZEOF(info->sProtoName));
info->hContact = 0;
info->currStatus = 0;
|