W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2000

Re: memory access problem

From: <jose.kahan@w3.org>
Date: Thu, 27 Jul 2000 12:52:57 +0200 (MET DST)
Message-Id: <200007271052.MAA12640@tuvalu.inrialpes.fr>
To: Jim Marshall <jim_marshall2268@hotmail.com>
CC: www-lib@w3.org
Hello James,

Do you know what is the invalid structure? That is, is it 

	me,
	me->physical, or
	me->address

that cause the problem?

I noticed that there HTAnchor_clearPhysical()  frees the memory
but doesn't set me->physical to NULL. That may be one problem.

In our previous episode, Jim Marshall said:

> PUBLIC char * HTAnchor_physical (HTParentAnchor * me)
> {
>     return me ? me->physical ? me->physical : me->address : NULL;
> }
> 
> located in HTAnchor.c.  I've not seen the tiernary operator used this way, 
> so I'm not sure what might be wrong or what it's trying to do.

According to the order of evaluation, it should be the same as:

    me ? (me->physical ? me->physical : me->address ) : NULL;

> Anyone have any thoughts on why I might be getting this error?  Can anyone 
> explain to me what the tiernary operator is going to do in the above code?
 
-Jose
Received on Thursday, 27 July 2000 06:53:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:37 GMT