Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/networking/nslookup.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/networking/nslookup.c
r2725 r3232 11 11 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 12 12 */ 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" 13 27 14 28 #include <resolv.h> … … 67 81 rc = getaddrinfo(hostname, NULL /*service*/, &hint, &result); 68 82 69 if ( !rc) {83 if (rc == 0) { 70 84 struct addrinfo *cur = result; 71 85 unsigned cnt = 0; … … 95 109 #endif 96 110 } 97 if (ENABLE_FEATURE_CLEAN_UP )111 if (ENABLE_FEATURE_CLEAN_UP && result) 98 112 freeaddrinfo(result); 99 113 return (rc != 0);
Note:
See TracChangeset
for help on using the changeset viewer.