diff options
Diffstat (limited to 'plugins/AVS')
-rw-r--r-- | plugins/AVS/src/cache.cpp | 16 | ||||
-rw-r--r-- | plugins/AVS/src/utils.cpp | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index 4e7c28bdab..999d9cba53 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -172,13 +172,13 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY // Get hash
char *szProto = GetContactProto(hContact);
if (szProto != NULL) {
- DBVARIANT dbv = {0};
- if ( !db_get_s(hContact, szProto, "AvatarHash", &dbv)) {
+ DBVARIANT dbv = { 0 };
+ if (!db_get_s(hContact, szProto, "AvatarHash", &dbv)) {
if (dbv.type == DBVT_TCHAR)
- _tcsncpy_s(cacn.hash, SIZEOF(cacn.hash), dbv.ptszVal, _TRUNCATE);
+ _tcsncpy_s(cacn.hash, dbv.ptszVal, _TRUNCATE);
else if (dbv.type == DBVT_BLOB) {
- ptrA szHash( mir_base64_encode(dbv.pbVal, dbv.cpbVal));
- _tcsncpy_s(cacn.hash, SIZEOF(cacn.hash), _A2T(szHash), _TRUNCATE);
+ ptrA szHash(mir_base64_encode(dbv.pbVal, dbv.cpbVal));
+ _tcsncpy_s(cacn.hash, _A2T(szHash), _TRUNCATE);
}
db_free(&dbv);
}
@@ -206,7 +206,7 @@ void DeleteAvatarFromCache(MCONTACT hContact, BOOL forever) hContact = GetContactThatHaveTheAvatar(hContact);
CacheNode *node = FindAvatarInCache(hContact, FALSE);
if (node == NULL) {
- struct CacheNode temp_node = {0};
+ struct CacheNode temp_node = { 0 };
temp_node.dwFlags |= (db_mc_isSub(hContact) ? MC_ISSUBCONTACT : 0);
NotifyMetaAware(hContact, &temp_node, (AVATARCACHEENTRY *)GetProtoDefaultAvatar(hContact));
return;
@@ -252,10 +252,10 @@ void PicLoader(LPVOID param) else if (dwDelay > 100)
dwDelay = 100;
- while(!g_shutDown) {
+ while (!g_shutDown) {
CacheNode *node = g_Cache;
- while(!g_shutDown && node) {
+ while (!g_shutDown && node) {
if (node->mustLoad > 0 && node->ace.hContact) {
node->mustLoad = 0;
AVATARCACHEENTRY ace_temp;
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index 244282cc25..e4ab45e2ff 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -244,7 +244,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) if ( lstrlen(tszFilename) < 4)
return -1;
- _tcsncpy_s(tszFilename, SIZEOF(tszFilename), VARST(tszFilename), _TRUNCATE);
+ _tcsncpy_s(tszFilename, VARST(tszFilename), _TRUNCATE);
if ((hFile = CreateFile(tszFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE)
return -2;
|