Use correct type instead of void* in item linked list.
authorAlexandre Julliard <julliard@winehq.org>
Wed, 27 Oct 2004 21:37:02 +0000 (21:37 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 27 Oct 2004 21:37:02 +0000 (21:37 +0000)
dlls/comctl32/comboex.c

index e447df58b57c493f36d9b87d96aa54cc93a3f273..ddf206fe8ca7da883da3ff7d111c14beea21de8c 100644 (file)
@@ -45,9 +45,9 @@
 WINE_DEFAULT_DEBUG_CHANNEL(comboex);
 
 /* Item structure */
-typedef struct
+typedef struct _CBE_ITEMDATA
 {
-    void         *next;
+    struct _CBE_ITEMDATA *next;
     UINT         mask;
     LPWSTR       pszText;
     LPWSTR       pszTemp;
@@ -456,7 +456,7 @@ static CBE_ITEMDATA * COMBOEX_FindItem(COMBOEX_INFO *infoPtr, INT index)
 
     /* find the item in the list */
     while (item && (i > index)) {
-       item = (CBE_ITEMDATA *)item->next;
+       item = item->next;
        i--;
     }
     if (!item || (i != index)) {
@@ -577,7 +577,7 @@ static INT COMBOEX_InsertItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
        CBE_ITEMDATA *moving = infoPtr->items;
 
        while ((i > index) && moving) {
-           moving = (CBE_ITEMDATA *)moving->next;
+           moving = moving->next;
            i--;
        }
        if (!moving) {
@@ -1250,7 +1250,7 @@ static BOOL COMBOEX_WM_DeleteItem (COMBOEX_INFO *infoPtr, DELETEITEMSTRUCT *dis)
 
        /* find the prior item in the list */
        while (item->next && (i > dis->itemID)) {
-           item = (CBE_ITEMDATA *)item->next;
+           item = item->next;
            i--;
        }
        if (!item->next || (i != dis->itemID)) {
@@ -1258,7 +1258,7 @@ static BOOL COMBOEX_WM_DeleteItem (COMBOEX_INFO *infoPtr, DELETEITEMSTRUCT *dis)
            return FALSE;
        }
        olditem = item->next;
-       item->next = (CBE_ITEMDATA *)((CBE_ITEMDATA *)item->next)->next;
+       item->next = item->next->next;
     }
     infoPtr->nb_items--;
 
@@ -1527,7 +1527,7 @@ static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr)
 
        item = infoPtr->items;
        while (item) {
-           next = (CBE_ITEMDATA *)item->next;
+           next = item->next;
            COMBOEX_FreeText (item);
            Free (item);
            item = next;