C
chmchi
Unregistered / Unconfirmed
GUEST, unregistred user!
NODE* lstInit(struct sHost host)
{
NODE* first=NULL;
struct sHost* Host;
lstInited = 1;
first=(NODE*) malloc(sizeof(NODE));
Host = (struct sHost*)malloc(sizeof(struct sHost));
if(Host==NULL || first==NULL)
MemoryCorruptedHandler("lstInit"
thrdBlock(BLOCKTHRDHST);
first->field = (void*)Host;
memcpy(Host ,&host,sizeof(struct sHost));
first->next = NULL;
thrdUnBlock(BLOCKTHRDHST);
return first;
}
{
NODE* first=NULL;
struct sHost* Host;
lstInited = 1;
first=(NODE*) malloc(sizeof(NODE));
Host = (struct sHost*)malloc(sizeof(struct sHost));
if(Host==NULL || first==NULL)
MemoryCorruptedHandler("lstInit"
thrdBlock(BLOCKTHRDHST);
first->field = (void*)Host;
memcpy(Host ,&host,sizeof(struct sHost));
first->next = NULL;
thrdUnBlock(BLOCKTHRDHST);
return first;
}