
Nmap Development mailing list archives
Re: [Patch] nsock/tests/tests_main.c
From: Henri Doreau <henri.doreau () gmail com>
Date: Tue, 6 Aug 2013 22:06:49 +0200
2013/8/6 Gisle Vanem <gvanem () broadpark no>:
I do like Nmap and will try to contribute. Here is a small fix for now: --- SVN-Latests/nsock/tests/tests_main.c 2013-06-27 15:25:14 +0000 +++ nsock/tests/tests_main.c 2013-07-11 11:55:05 +0000 @@ -64,7 +64,7 @@ fflush(stdout); rc = test_case_run(current); if (rc) { - printf(TEST_FAILED " (%s)\n", strerror(-rc)); + printf(TEST_FAILED " (%s)\n", socket_strerror(-rc)); break; } printf(TEST_OK "\n"); ---------- Using strerror() for Winsock failures is a big no-no. Besides, this test program uses ANSI codes to print to the console. Also a no-no. --gv
Thanks! I've committed the socket_strerror() part with a little change (r31677). Can you elaborate on why ANSI codes should be avoided? I wouldn't put them everywhere but they're something quite common for such tests. Regards -- Henri _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [Patch] nsock/tests/tests_main.c Gisle Vanem (Aug 06)
- Re: [Patch] nsock/tests/tests_main.c Henri Doreau (Aug 06)
- Re: [Patch] nsock/tests/tests_main.c Gisle Vanem (Aug 07)
- Re: [Patch] nsock/tests/tests_main.c Gisle Vanem (Aug 07)
- Re: [Patch] nsock/tests/tests_main.c Henri Doreau (Aug 10)
- Re: [Patch] nsock/tests/tests_main.c Gisle Vanem (Aug 10)
- Re: [Patch] nsock/tests/tests_main.c Henri Doreau (Aug 11)
- Re: [Patch] nsock/tests/tests_main.c Gisle Vanem (Aug 12)
- Re: [Patch] nsock/tests/tests_main.c Henri Doreau (Aug 13)
- Re: [Patch] nsock/tests/tests_main.c Gisle Vanem (Aug 07)
- Re: [Patch] nsock/tests/tests_main.c Henri Doreau (Aug 06)
- Re: [Patch] nsock/tests/tests_main.c Gisle Vanem (Aug 07)
- Re: [Patch] nsock/tests/tests_main.c Henri Doreau (Aug 10)