> #define LIST_LOOP(L,V,N) \ > for ((N) = (L)->head; (N); (N) = (N)->next) > if (((V) = (N)->data) != NULL) > take a look at Linux's list.h it does all this stuff.. maybe it uses gcc extensions though.. Dave. -- David Airlie, Software Engineer http://www.skynet.ie/~airlied / airlied at skynet.ie pam_smb / Linux DECstation / Linux VAX / ILUG person