mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 04:08:47 +00:00
improve hostsreader test code
This commit is contained in:
parent
f85cecdabe
commit
a1c31e73b6
@ -86,9 +86,11 @@ ip_type4 hostsreader_get_numeric_ip_for_name(const char* name) {
|
||||
}
|
||||
|
||||
#ifdef HOSTSREADER_TEST
|
||||
int main() {
|
||||
#include "ip_type.c"
|
||||
int main(int a, char**b) {
|
||||
char buf[256];
|
||||
char * ret = hostsreader_get_ip_for_name("goo", buf, sizeof buf);
|
||||
if(a != 2) return 1;
|
||||
char * ret = hostsreader_get_ip_for_name(b[1], buf, sizeof buf);
|
||||
printf("%s\n", ret ? ret : "null");
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user