"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib/ares__sortaddrinfo.c" between
c-ares-1.17.1.tar.gz and c-ares-1.17.2.tar.gz

About: c-ares is a C library for asynchronous DNS requests (including name resolves).

ares__sortaddrinfo.c  (c-ares-1.17.1):ares__sortaddrinfo.c  (c-ares-1.17.2)
skipping to change at line 455 skipping to change at line 455
int nelem = 0, i; int nelem = 0, i;
int has_src_addr; int has_src_addr;
struct addrinfo_sort_elem *elems; struct addrinfo_sort_elem *elems;
cur = list_sentinel->ai_next; cur = list_sentinel->ai_next;
while (cur) while (cur)
{ {
++nelem; ++nelem;
cur = cur->ai_next; cur = cur->ai_next;
} }
if (!nelem)
return ARES_ENODATA;
elems = (struct addrinfo_sort_elem *)ares_malloc( elems = (struct addrinfo_sort_elem *)ares_malloc(
nelem * sizeof(struct addrinfo_sort_elem)); nelem * sizeof(struct addrinfo_sort_elem));
if (!elems) if (!elems)
{ {
return ARES_ENOMEM; return ARES_ENOMEM;
} }
/* /*
* Convert the linked list to an array that also contains the candidate * Convert the linked list to an array that also contains the candidate
* source address for each destination address. * source address for each destination address.
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)