void WMRemoveLeafForTreeNode(WMTreeNode * aNode, void *leaf) { int index; wassertr(aNode != NULL); wassertr(aNode->leaves != NULL); index = WMFindInArray(aNode->leaves, sameData, leaf); if (index != WANotFound) { WMDeleteFromArray(aNode->leaves, index); } }
struct display *FindDisplayByAddress(XdmcpNetaddr addr, int addrlen, CARD16 displayNumber) { if (displays != NULL) { int i; struct _matchAddress a; a.addr = addr; a.addrlen = addrlen; a.displayNumber = displayNumber; if ((i = WMFindInArray(displays, (WMMatchDataProc *) matchAddress, &a)) != WANotFound) return WMGetFromArray(displays, i); } return NULL; }