Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rofl0r/proxychains-ng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2016-02-04 12:38:16 +0300
committerrofl0r <retnyg@gmx.net>2016-02-04 12:38:16 +0300
commita1c31e73b6b094948daa9d77a429548017538f1c (patch)
tree43907d795b5817db50027a505798d7e461aa0ac8
parentf85cecdabea90db31dc2891c404ccee4bc655354 (diff)
improve hostsreader test code
-rw-r--r--src/hostsreader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hostsreader.c b/src/hostsreader.c
index 2e6a4f1..b2b0b07 100644
--- a/src/hostsreader.c
+++ b/src/hostsreader.c
@@ -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