Lines Matching refs:elems
1351 struct addrinfo_sort_elem* elems; in _rfc6724_sort() local
1359 elems = (struct addrinfo_sort_elem*) malloc(nelem * sizeof(struct addrinfo_sort_elem)); in _rfc6724_sort()
1360 if (elems == NULL) { in _rfc6724_sort()
1371 elems[i].ai = cur; in _rfc6724_sort()
1372 elems[i].original_order = i; in _rfc6724_sort()
1374 has_src_addr = _find_src_addr(cur->ai_addr, &elems[i].src_addr.sa, mark, uid); in _rfc6724_sort()
1378 elems[i].has_src_addr = has_src_addr; in _rfc6724_sort()
1382 qsort((void*) elems, nelem, sizeof(struct addrinfo_sort_elem), _rfc6724_compare); in _rfc6724_sort()
1384 list_sentinel->ai_next = elems[0].ai; in _rfc6724_sort()
1386 elems[i].ai->ai_next = elems[i + 1].ai; in _rfc6724_sort()
1388 elems[nelem - 1].ai->ai_next = NULL; in _rfc6724_sort()
1391 free(elems); in _rfc6724_sort()