Commit df3a0564 authored by rswindell's avatar rswindell
Browse files

Don't pass flags to listInit().

parent bdb1abde
......@@ -39,8 +39,10 @@
#include <string.h> /* memset */
#include "link_list.h"
link_list_t* listInit(link_list_t* list, unsigned long flags)
link_list_t* listInit(link_list_t* list)
{
unsigned long flags=0;
if(flags&LINK_LIST_MALLOC || list==NULL) {
if((list=(link_list_t*)malloc(sizeof(link_list_t)))==NULL)
return(NULL);
......
......@@ -59,12 +59,12 @@ typedef struct list_node {
typedef struct {
list_node_t* first; /* first node in list (or NULL) */
list_node_t* last; /* last node in list (or NULL) */
unsigned long flags; /* flags passed to listInit() */
unsigned long flags; /* private use flags */
long count; /* number of nodes in list */
} link_list_t;
/* Initialization, Allocation, and Freeing of Lists and Nodes */
link_list_t* listInit(link_list_t*, unsigned long flags);
link_list_t* listInit(link_list_t* /* NULL to auto-allocate */);
link_list_t* listFree(link_list_t*);
void listFreeNodes(link_list_t*);
void listFreeNodeData(list_node_t* node);
......
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