From 9d50daf8ae4c81aa1b3bfd665f38a3c78068da23 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 31 Aug 2016 12:38:00 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@17227 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/addcontact.cpp | 8 +++----- src/mir_app/src/services.cpp | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp index 7b049000c0..5a3ef8408a 100644 --- a/src/mir_app/src/addcontact.cpp +++ b/src/mir_app/src/addcontact.cpp @@ -96,14 +96,12 @@ public: isSet = 1; } } - if (!isSet) - { + if (!isSet) { if (m_acs.handleType == HANDLE_EVENT) szName = mir_a2u(szUin); - else - { + else { szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->id); - if (!szName) + if (szName == NULL) szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->nick); } } diff --git a/src/mir_app/src/services.cpp b/src/mir_app/src/services.cpp index 65b27c4862..04f30a5aba 100644 --- a/src/mir_app/src/services.cpp +++ b/src/mir_app/src/services.cpp @@ -225,6 +225,7 @@ void UpdateFontSettings(FontIDW *font_id, FontSettingsW *fontsettings) CreateFromFontSettings(&font_id->deffontsettings, &lf); colour = font_id->deffontsettings.colour; } + else memset(&lf, 0, sizeof(lf)); fontsettings->style = (lf.lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf.lfItalic ? DBFONTF_ITALIC : 0) | (lf.lfUnderline ? DBFONTF_UNDERLINE : 0) | (lf.lfStrikeOut ? DBFONTF_STRIKEOUT : 0); -- cgit v1.2.3