Re: why it is not work?
- From: Chris McDonald <chris@xxxxxxxxxxxxxxx>
- Date: Wed, 7 Dec 2005 23:46:53 +0000 (UTC)
"yezi" <ye_line@xxxxxxxxxxx> writes:
>Hi: all:
>The code is like :
>char *data;
>data = malloc(1000);
>if (data = NULL)
here ^^^
> {
> printf (" can not assign the memory for the packet\n");
> exit(1);
> }
> memset(data,'\0',1000);
>The code is failure say "Segmentation fault"
>The problem is memset, why?
--
Chris.
.
- Follow-Ups:
- Re: why it is not work?
- From: yezi
- Re: why it is not work?
- References:
- why it is not work?
- From: yezi
- why it is not work?
- Prev by Date: why it is not work?
- Next by Date: Re: why it is not work?
- Previous by thread: why it is not work?
- Next by thread: Re: why it is not work?
- Index(es):
Relevant Pages
|
|