Mikołaj Zalewski : comctl32: header: Don' t check lpItem for NULL in GetItemT.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 15 09:42:27 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 98658699020ab3bb04da2a2d2959c7cd709fa7a4
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=98658699020ab3bb04da2a2d2959c7cd709fa7a4
Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date: Sat May 13 21:07:54 2006 +0200
comctl32: header: Don't check lpItem for NULL in GetItemT.
---
dlls/comctl32/header.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index cddf740..cab8cc7 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -892,20 +892,20 @@ HEADER_GetItemT (HWND hwnd, INT nItem, L
lpItem = &infoPtr->items[nItem];
if (phdi->mask & HDI_BITMAP)
- phdi->hbm = (lpItem != NULL) ? lpItem->hbm : 0;
+ phdi->hbm = lpItem->hbm;
if (phdi->mask & HDI_FORMAT)
- phdi->fmt = (lpItem != NULL) ? lpItem->fmt : 0;
+ phdi->fmt = lpItem->fmt;
if (phdi->mask & HDI_WIDTH)
- phdi->cxy = (lpItem != NULL) ? lpItem->cxy : 0;
+ phdi->cxy = lpItem->cxy;
if (phdi->mask & HDI_LPARAM)
- phdi->lParam = (lpItem != NULL) ? lpItem->lParam : 0;
+ phdi->lParam = lpItem->lParam;
if (phdi->mask & HDI_IMAGE)
{
- phdi->iImage = (lpItem != NULL) ? lpItem->iImage : 0;
+ phdi->iImage = lpItem->iImage;
if (lpItem->iImage == I_IMAGECALLBACK)
{
HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_IMAGE, phdi, lpItem, bUnicode);
@@ -913,12 +913,11 @@ HEADER_GetItemT (HWND hwnd, INT nItem, L
}
if (phdi->mask & HDI_ORDER)
- phdi->iOrder = (lpItem != NULL) ? lpItem->iOrder : 0;
+ phdi->iOrder = lpItem->iOrder;
if (phdi->mask & HDI_TEXT)
{
- if (lpItem == NULL) *phdi->pszText = 0; /* null pointer check */
- else if (lpItem->pszText == LPSTR_TEXTCALLBACKW) /* covers == TEXTCALLBACKA too */
+ if (lpItem->pszText == LPSTR_TEXTCALLBACKW) /* covers == TEXTCALLBACKA too */
{
HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_TEXT, phdi, lpItem, bUnicode);
}
More information about the wine-cvs
mailing list