From 139cfdf630b6257529a3f4bad40463e73fc38d7d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 2 Jun 2014 14:42:45 +0000 Subject: minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@9397 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/clist.cpp | 2 +- src/modules/chat/tools.cpp | 4 ++-- src/modules/options/iconheader.cpp | 2 +- src/modules/plugins/dll_sniffer.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp index 3709b94610..a9e55d5fa6 100644 --- a/src/modules/chat/clist.cpp +++ b/src/modules/chat/clist.cpp @@ -60,7 +60,7 @@ MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi return NULL; CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)pszModule); - if (pszGroup && lstrlen(pszGroup) > 0) + if (pszGroup[0]) db_set_ts(hContact, "CList", "Group", pszGroup); else db_unset(hContact, "CList", "Group"); diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index c3cdf9889e..dd74d42f1a 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -38,7 +38,7 @@ TCHAR* RemoveFormatting(const TCHAR* pszWord) int i = 0; int j = 0; - if (pszWord == 0 || lstrlen(pszWord) == 0) + if (pszWord == 0 || pszWord[0] == 0) return NULL; while (j < 9999 && i <= lstrlen(pszWord)) { @@ -170,7 +170,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa { static TCHAR szBuf[4 * 1024]; - if (!fmt || lstrlen(fmt) == 0 || lstrlen(fmt) > 2000) + if (!fmt || fmt[0] == 0 || lstrlen(fmt) > 2000) return 0; va_list marker; diff --git a/src/modules/options/iconheader.cpp b/src/modules/options/iconheader.cpp index d5858d7e33..d9d6f9deb6 100644 --- a/src/modules/options/iconheader.cpp +++ b/src/modules/options/iconheader.cpp @@ -504,7 +504,7 @@ static LRESULT CALLBACK MIcoTabWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L } case ITCM_SETSEL: - if (wParam >= 0 && (int)wParam < itc->pList.getCount()) { + if ((int)wParam >= 0 && (int)wParam < itc->pList.getCount()) { itc->nSelectedIdx = wParam; SetWindowText(hwndDlg, itc->pList[itc->nSelectedIdx]->tcsName); RedrawWindow(hwndDlg, NULL, NULL, RDW_INVALIDATE); diff --git a/src/modules/plugins/dll_sniffer.cpp b/src/modules/plugins/dll_sniffer.cpp index 7e16df10aa..2b5f2822fd 100644 --- a/src/modules/plugins/dll_sniffer.cpp +++ b/src/modules/plugins/dll_sniffer.cpp @@ -62,7 +62,7 @@ MUUID* GetPluginInterfaces(const TCHAR* ptszFileName, bool& bIsPlugin) if (ptr == NULL) __leave; - PIMAGE_NT_HEADERS pINTH; + PIMAGE_NT_HEADERS pINTH = { 0 }; PIMAGE_DOS_HEADER pIDH = (PIMAGE_DOS_HEADER)ptr; if ( pIDH->e_magic == IMAGE_DOS_SIGNATURE ) pINTH = (PIMAGE_NT_HEADERS)(ptr + pIDH->e_lfanew); -- cgit v1.2.3