From 8ffc77be71507825a8f7585bcabff8ccc370206a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 8 Dec 2018 20:12:16 +0300 Subject: db_get_sa / db_get_wsa to receive the default value, massive code simplification --- plugins/GmailNotifier/src/check.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugins/GmailNotifier') diff --git a/plugins/GmailNotifier/src/check.cpp b/plugins/GmailNotifier/src/check.cpp index 88cafca600..ace11e7801 100644 --- a/plugins/GmailNotifier/src/check.cpp +++ b/plugins/GmailNotifier/src/check.cpp @@ -48,9 +48,7 @@ void CheckMailInbox(Account *curAcc) curAcc->IsChecking = true; - ptrA szNick(db_get_sa(curAcc->hContact, "CList", "MyHandle")); - if (szNick == nullptr) - szNick = mir_strdup(curAcc->name); + ptrA szNick(db_get_sa(curAcc->hContact, "CList", "MyHandle", curAcc->name)); char *tail = strstr(szNick, " ["); if (tail) *tail = 0; -- cgit v1.2.3