+#define FIND_SUITABLE(pointertype, listhead, ptr) \
+ do { \
+ pointertype _l, _p; \
+ \
+ for (_l = (listhead), _p = NULL; !_p && _l; _l = (pointertype)_l->list.next) { \
+ if (!_l->match_seat || (SeatId && xf86nameCompare(_l->match_seat, SeatId) == 0)) \
+ _p = _l; \
+ } \
+ \
+ (ptr) = _p; \
+ } while(0)
+