Changeset 1392 in MondoRescue for branches/stable/mondo/src/lib/mr_list.c


Ignore:
Timestamp:
May 6, 2007, 1:55:53 AM (17 years ago)
Author:
Bruno Cornec
Message:

Fix a bug for allocation (pointer manipulation again - Thanks again Michel Loiseleur :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/lib/mr_list.c

    r1364 r1392  
    1515
    1616/* List allocation and initialization */
    17 void mr_list_alloc(struct mr_list *list) {
     17struct mr_list *mr_list_alloc(void) {
    1818
    1919    list = mr_malloc(sizeof(struct mr_list));
    2020    list->first = NULL;
    2121    list->last = NULL;
     22    return(list);
    2223}
    2324
    2425/* Elt of list allocation and initialization */
    25 void mr_list_alloc_elt(struct mr_list_elt *elt, void *data, void (*mr_free_data)(void *data)) {
     26struct mr_list_elt *mr_list_alloc_elt(void *data, void (*mr_free_data)(void *data)) {
    2627
    2728    elt = mr_malloc(sizeof(struct mr_list_elt));
     
    3031    elt->prev = NULL;
    3132    elt->next = NULL;
     33    return(elt);
    3234}
    3335
Note: See TracChangeset for help on using the changeset viewer.