Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of azure_c_shared_utility by
Diff: list.c
- Revision:
- 7:1af47e3a19b6
- Parent:
- 0:fa2de1b79154
--- 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)
