c语言动态内存分配问题,Linux平台问题

Linux平台,好像动态内存分配的函数不好使了,无法给链表头节点初始化

img

typedef struct LinkList
{
  char data;
  struct LinkList* next;
}Node,*LinkList;
//初始化单链表,创建一个头指针与一个头结点
Status InitList(LinkList l)
{
  l =(Node*)calloc(1,sizeof(Node));//头结点
  l->next = NULL;//初始化头结点
  l->data = 0;
  return OK;
}
Elemtype InsertList(LinkList l,Elemtype e,int i)//在第i个元素之前插入
{
   if(i<0 || i>Length(l)+1)
       return 0;
    Node* new =(Node*)malloc(sizeof(Node));//新节点
   while(--i)
     l = l->next;
   new->data = e;//节点值
   new->next = l->next;
   l->next = new;
   l->data++;
   return e;
}

Status Create_tail(LinkList l,Elemtype* e,int i)
{
  if(!Empty(l))
      return ERROR;
  int j = 0;
  while(i - j)
  {
    InsertList(l,*(e+j),l->data+1);
    ++j;
  }
  return OK;
}

int main()
{
    int i = 0;
    Elemtype a[10],e;
  LinkList h;
  InitList(h);
  scanf("%s",a);
  Create_tail(h,a,strlen(a));
  DispList(h);
  printf("%d\n",Length(h));
  if(Empty(h))
      printf("此链表为空\n");
  else
      printf("此链表不为空\n");
  GetElem(h,3,&e);
  printf("%c\n",e);
  LocateElem(h,'V');
  InsertList(h,'D',7);
  DispList(h);
  DeleList(h,&e,1);
  DispList(h);
  DestoryList(h);
  return 0;
}

参数用二级指针