Correct order of calls for display IP address

This commit is contained in:
Willem Toorop 2013-10-29 16:16:05 +01:00
parent e4f08150b1
commit fbff480a31
1 changed files with 2 additions and 1 deletions

View File

@ -90,8 +90,9 @@ main()
if (num_addresses > 0) {
for (rec_count = 0; rec_count < num_addresses; ++rec_count )
{
char * display = getdns_display_ip_address(this_address_data);
char * display;
this_ret = getdns_list_get_bindata(just_the_addresses_ptr, rec_count, &this_address_data); // Ignore any error
display = getdns_display_ip_address(this_address_data);
/* Just print the address */
printf("The address is %s\n", display);
if (display) {