Lines Matching refs:elems
1350 struct addrinfo_sort_elem* elems; in _rfc6724_sort() local
1358 elems = (struct addrinfo_sort_elem*) malloc(nelem * sizeof(struct addrinfo_sort_elem)); in _rfc6724_sort()
1359 if (elems == NULL) { in _rfc6724_sort()
1370 elems[i].ai = cur; in _rfc6724_sort()
1371 elems[i].original_order = i; in _rfc6724_sort()
1373 has_src_addr = _find_src_addr(cur->ai_addr, &elems[i].src_addr.sa, mark, uid); in _rfc6724_sort()
1377 elems[i].has_src_addr = has_src_addr; in _rfc6724_sort()
1381 qsort((void*) elems, nelem, sizeof(struct addrinfo_sort_elem), _rfc6724_compare); in _rfc6724_sort()
1383 list_sentinel->ai_next = elems[0].ai; in _rfc6724_sort()
1385 elems[i].ai->ai_next = elems[i + 1].ai; in _rfc6724_sort()
1387 elems[nelem - 1].ai->ai_next = NULL; in _rfc6724_sort()
1390 free(elems); in _rfc6724_sort()