[ILUG] C puzzle

Conor Daly conor.daly at oceanfree.net
Thu Jul 1 20:34:24 IST 2004


On Thu, Jul 01, 2004 at 04:00:43PM +0100 or so it is rumoured hereabouts, 
Paul Jakma thought:
> 
> However, every now and then bugs are discovered[1] due to usage such 
> as:
> 
>    LIST_LOOP (list, val, this)
>      {
>        ....
>        delete_member (this);
>        ....
>      }

If your delete_member() function is correctly implemented, it should link
element (N-1) to element (N+1) and avoid breaking the list.  Is this what
you mean?
 
Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  8:34pm  up 6 days, 23:46,  0 users,  load average: 0.20, 0.17, 0.09
Hobbiton.cod.ie
  8:32pm  up 100 days, 23:58,  1 user,  load average: 0.06, 0.15, 0.09



More information about the ILUG mailing list