Commit 8fd9953b authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(aux_item_list_add_items): Simplified the code.

parent a54d9fb0
/*
* $Id: aux-items.c,v 1.54 2003/08/16 13:00:37 ceder Exp $
* $Id: aux-items.c,v 1.55 2003/08/16 15:30:59 ceder Exp $
* Copyright (C) 1994-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -819,10 +819,9 @@ aux_item_list_add_items(Aux_item_list *add_to_list,
* this function recursively.
*/
add_to_list->items = srealloc(add_to_list->items,
(add_to_list->length + items_to_add->length) *
sizeof(Aux_item));
add_to_list->length += items_to_add->length;
add_to_list->items = srealloc(add_to_list->items,
add_to_list->length * sizeof(Aux_item));
*highest_ptr = *highest_ptr + items_to_add->length;
for (i = 0; i < items_to_add->length; i++)
......@@ -874,9 +873,7 @@ prepare_aux_item_list(Aux_item_list *list,
return;
for (i = 0; i < list->length; i++)
{
prepare_aux_item(&list->items[i], creator, NULL);
}
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment