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->physical, or

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?
Received on Thursday, 27 July 2000 06:53:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:53 UTC