diff options
-rw-r--r-- | src/core/stdclist/src/contact.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/clistmod.cpp | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/core/stdclist/src/contact.cpp b/src/core/stdclist/src/contact.cpp index 23163d83fc..5f5f778e26 100644 --- a/src/core/stdclist/src/contact.cpp +++ b/src/core/stdclist/src/contact.cpp @@ -55,11 +55,9 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2) {
MCONTACT a = c1->hContact, b = c2->hContact;
wchar_t namea[128], *nameb;
- int statusa, statusb;
- int rc;
- statusa = db_get_w(a, c1->proto, "Status", ID_STATUS_OFFLINE);
- statusb = db_get_w(b, c2->proto, "Status", ID_STATUS_OFFLINE);
+ int statusa = db_get_w(a, c1->proto, "Status", ID_STATUS_OFFLINE);
+ int statusb = db_get_w(b, c2->proto, "Status", ID_STATUS_OFFLINE);
if (g_bSortByProto) {
/* deal with statuses, online contacts have to go above offline */
@@ -68,7 +66,7 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2) }
/* both are online, now check protocols */
if (c1->proto != NULL && c2->proto != NULL) {
- rc = mir_strcmp(c1->proto, c2->proto);
+ int rc = mir_strcmp(c1->proto, c2->proto);
if (rc != 0)
return rc;
}
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index 2255ed5ff7..bd4569688c 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -404,7 +404,7 @@ MIR_APP_DLL(int) Clist_ContactCompare(MCONTACT hContact1, MCONTACT hContact2) ClcData *dat = (ClcData*)GetWindowLongPtr(cli.hwndContactTree, 0);
if (dat != NULL) {
ClcContact *p1, *p2;
- if (!cli.pfnFindItem(cli.hwndContactTree, dat, hContact1, &p1, NULL, NULL) && !cli.pfnFindItem(cli.hwndContactTree, dat, hContact2, &p2, NULL, NULL))
+ if (cli.pfnFindItem(cli.hwndContactTree, dat, hContact1, &p1, NULL, NULL) && cli.pfnFindItem(cli.hwndContactTree, dat, hContact2, &p2, NULL, NULL))
return cli.pfnCompareContacts(p1, p2);
}
|