Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (7 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/networking/nslookup.c

    r2725 r3232  
    1111 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    1212 */
     13
     14//usage:#define nslookup_trivial_usage
     15//usage:       "[HOST] [SERVER]"
     16//usage:#define nslookup_full_usage "\n\n"
     17//usage:       "Query the nameserver for the IP address of the given HOST\n"
     18//usage:       "optionally using a specified DNS server"
     19//usage:
     20//usage:#define nslookup_example_usage
     21//usage:       "$ nslookup localhost\n"
     22//usage:       "Server:     default\n"
     23//usage:       "Address:    default\n"
     24//usage:       "\n"
     25//usage:       "Name:       debian\n"
     26//usage:       "Address:    127.0.0.1\n"
    1327
    1428#include <resolv.h>
     
    6781    rc = getaddrinfo(hostname, NULL /*service*/, &hint, &result);
    6882
    69     if (!rc) {
     83    if (rc == 0) {
    7084        struct addrinfo *cur = result;
    7185        unsigned cnt = 0;
     
    95109#endif
    96110    }
    97     if (ENABLE_FEATURE_CLEAN_UP)
     111    if (ENABLE_FEATURE_CLEAN_UP && result)
    98112        freeaddrinfo(result);
    99113    return (rc != 0);
Note: See TracChangeset for help on using the changeset viewer.