From 5860633d22c07e1e225bdc4b0780f56dd025b68c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 11 Apr 2015 17:55:20 +0000 Subject: dead code removed git-svn-id: http://svn.miranda-ng.org/main/trunk@12769 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/metacontacts/meta_utils.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp index 761948b0b4..fa0d33caa3 100644 --- a/src/modules/metacontacts/meta_utils.cpp +++ b/src/modules/metacontacts/meta_utils.cpp @@ -259,8 +259,8 @@ MCONTACT Meta_GetMostOnlineSupporting(DBCachedContact *cc, int pflagnum, unsigne MCONTACT most_online_contact = Meta_GetContactHandle(cc, cc->nDefault); char *szProto = GetContactProto(most_online_contact); if (szProto && CallProtoService(szProto, PS_GETSTATUS, 0, 0) >= ID_STATUS_ONLINE) { - DWORD caps = szProto ? CallProtoService(szProto, PS_GETCAPS, pflagnum, 0) : 0; - if (szProto && (capability == -1 || (caps & capability) == capability)) { + DWORD caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0); + if (capability == -1 || (caps & capability) == capability) { most_online_status = db_get_w(most_online_contact, szProto, "Status", ID_STATUS_OFFLINE); // if our default is not offline, and option to use default is set - return default @@ -280,12 +280,11 @@ MCONTACT Meta_GetMostOnlineSupporting(DBCachedContact *cc, int pflagnum, unsigne MCONTACT hContact = Meta_GetContactHandle(cc, i); szProto = GetContactProto(hContact); - - if (!szProto || CallProtoService(szProto, PS_GETSTATUS, 0, 0) < ID_STATUS_ONLINE) // szProto offline or connecting + if (szProto == NULL || CallProtoService(szProto, PS_GETSTATUS, 0, 0) < ID_STATUS_ONLINE) // szProto offline or connecting continue; DWORD caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0); - if (szProto && (capability == -1 || (caps & capability) == capability)) { + if (capability == -1 || (caps & capability) == capability) { int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE); if (status == ID_STATUS_ONLINE) { most_online_contact = hContact; -- cgit v1.2.3