Update sq_list.c
This commit is contained in:
parent
20820b4ea5
commit
c17ac76bd7
@ -6,6 +6,11 @@
|
|||||||
sq_list* init_sq_list(void)
|
sq_list* init_sq_list(void)
|
||||||
{
|
{
|
||||||
sq_list* name = (sq_list*)malloc(sizeof(sq_list));
|
sq_list* name = (sq_list*)malloc(sizeof(sq_list));
|
||||||
|
if (name == NULL)
|
||||||
|
{
|
||||||
|
printf("error: malloc failed![From init_sq_list]\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
memset(name, 0, sizeof(sq_list));
|
memset(name, 0, sizeof(sq_list));
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user