[user32/listbox.c] Remove deadcode (Coverity)
Paul Vriens
paul.vriens.wine at gmail.com
Fri Feb 9 00:55:40 CST 2007
Hi,
we already check for 'item' being NULL (line 546) and bail out if it
is. The 2 checks for 'item' being NULL afterwards can thus be removed.
Should fix Coverity CID-16.
Changelog
Remove deadcode
Cheers,
Paul
-------------- next part --------------
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c
index 2d1b9f3..bef0c8b 100644
--- a/dlls/user32/listbox.c
+++ b/dlls/user32/listbox.c
@@ -568,12 +568,12 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
dis.hDC = hdc;
dis.itemID = index;
dis.itemState = 0;
- if (item && item->selected) dis.itemState |= ODS_SELECTED;
+ if (item->selected) dis.itemState |= ODS_SELECTED;
if (!ignoreFocus && (descr->focus_item == index) &&
(descr->caret_on) &&
(descr->in_focus)) dis.itemState |= ODS_FOCUS;
if (!IsWindowEnabled(descr->self)) dis.itemState |= ODS_DISABLED;
- dis.itemData = item ? item->data : 0;
+ dis.itemData = item->data;
dis.rcItem = *rect;
TRACE("[%p]: drawitem %d (%s) action=%02x state=%02x rect=%d,%d-%d,%d\n",
descr->self, index, item ? debugstr_w(item->str) : "", action,
--
1.4.4.4
More information about the wine-patches
mailing list