Azure IoT / azure_c_shared_utility

Dependents:   STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more

Revision:
7:1af47e3a19b6
Parent:
0:fa2de1b79154
diff -r c55b013dfc2a -r 1af47e3a19b6 list.c
--- a/list.c	Fri Jul 01 10:43:23 2016 -0700
+++ b/list.c	Fri Jul 29 16:01:07 2016 -0700
@@ -46,7 +46,7 @@
         while (list_instance->head != NULL)
         {
             LIST_ITEM_INSTANCE* current_item = list_instance->head;
-            list_instance->head = current_item->next;
+            list_instance->head = (LIST_ITEM_INSTANCE*)current_item->next;
             free(current_item);
         }
 
@@ -90,7 +90,7 @@
                 LIST_ITEM_INSTANCE* current = list_instance->head;
                 while (current->next != NULL)
                 {
-                    current = current->next;
+                    current = (LIST_ITEM_INSTANCE*)current->next;
                 }
 
                 current->next = result;
@@ -127,7 +127,7 @@
                 }
                 else
                 {
-                    list_instance->head = current_item->next;
+                    list_instance->head = (LIST_ITEM_INSTANCE*)current_item->next;
                 }
 
                 free(current_item);
@@ -135,7 +135,7 @@
                 break;
             }
             previous_item = current_item;
-			current_item = current_item->next;
+			current_item = (LIST_ITEM_INSTANCE*)current_item->next;
         }
 
 		if (current_item == NULL)
@@ -186,7 +186,7 @@
     else
     {
         /* Codes_SRS_LIST_01_018: [list_get_next_item shall return the next item in the list following the item item_handle.] */
-        result = ((LIST_ITEM_INSTANCE*)item_handle)->next;
+        result = (LIST_ITEM_HANDLE)((LIST_ITEM_INSTANCE*)item_handle)->next;
     }
 
     return result;
@@ -237,7 +237,7 @@
             }
 
             /* Codes_SRS_LIST_01_016: [If the match function returns false, list_find shall consider that item as not matching.] */
-            current = current->next;
+            current = (LIST_ITEM_INSTANCE*)current->next;
         }
 
         if (current == NULL)