[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: A very strange problem in C code.
- From: Aurora <bravefly@...>
- Date: Fri, 7 May 2010 00:56:49 +0800
Dear,
there is a strange problem in my C code, as below:
program:
printf("---%p\n", soap->header);
soap_header(soap);
printf("---%p\n", soap->header);
soap_header function:
void soap_header(struct soap *soap)
{
printf("soap_header enter %p\n", soap->header);
if(!soap->header)
{
printf("soap_header in IF %p\n", soap->header);
if((soap->header = (struct SOAP_ENV__Header*)soap_malloc(soap,
sizeof(struct SOAP_ENV__Header))))
soap_default_SOAP_ENV__Header(soap, soap->header);
}
printf("soap_header exit %p\n", soap->header);
}
The output is :
---(nil)
soap_header enter (nil)
soap_header in IF (nil)
soap_header exit 0xa0d3f80
---(nil)
Who know the reason ? thanks.