Lines Matching refs:elems
1849 struct addrinfo_sort_elem *elems; in _rfc6724_sort() local
1857 elems = (struct addrinfo_sort_elem *)malloc(nelem * sizeof(struct addrinfo_sort_elem)); in _rfc6724_sort()
1858 if (elems == NULL) { in _rfc6724_sort()
1869 elems[i].ai = cur; in _rfc6724_sort()
1870 elems[i].original_order = i; in _rfc6724_sort()
1872 has_src_addr = _find_src_addr(cur->ai_addr, &elems[i].src_addr.generic, mark, uid); in _rfc6724_sort()
1876 elems[i].has_src_addr = has_src_addr; in _rfc6724_sort()
1880 qsort((void *)elems, nelem, sizeof(struct addrinfo_sort_elem), _rfc6724_compare); in _rfc6724_sort()
1882 list_sentinel->ai_next = elems[0].ai; in _rfc6724_sort()
1884 elems[i].ai->ai_next = elems[i + 1].ai; in _rfc6724_sort()
1886 elems[nelem - 1].ai->ai_next = NULL; in _rfc6724_sort()
1889 free(elems); in _rfc6724_sort()