Nmap Development mailing list archives
Re: [nmap-svn] r31128 - in nmap-exp/d33tah/ncat-lua/ncat: . test
From: Jacek Wielemborek <wielemborekj1 () gmail com>
Date: Fri, 28 Jun 2013 17:42:59 +0200
2013/6/28 <commit-mailer () nmap org>:
Author: david Date: Fri Jun 28 15:14:41 2013 New Revision: 31128 Log: Pointer syntax. Modified: nmap-exp/d33tah/ncat-lua/ncat/ncat_exec.h nmap-exp/d33tah/ncat-lua/ncat/ncat_exec_win.c nmap-exp/d33tah/ncat-lua/ncat/test/test-escapeargs.c Modified: nmap-exp/d33tah/ncat-lua/ncat/ncat_exec.h ============================================================================== --- nmap-exp/d33tah/ncat-lua/ncat/ncat_exec.h (original) +++ nmap-exp/d33tah/ncat-lua/ncat/ncat_exec.h Fri Jun 28 15:14:41 2013 @@ -101,5 +101,5 @@ /* Set a pseudo-signal handler that is called when a thread representing a child process dies. This is only used on Windows. */ extern void set_pseudo_sigchld_handler(void (*handler)(void)); -char* escape_quotes(char* arg, unsigned int arglen); +char *escape_quotes(char* arg, unsigned int arglen); #endif Modified: nmap-exp/d33tah/ncat-lua/ncat/ncat_exec_win.c ============================================================================== --- nmap-exp/d33tah/ncat-lua/ncat/ncat_exec_win.c (original) +++ nmap-exp/d33tah/ncat-lua/ncat/ncat_exec_win.c Fri Jun 28 15:14:41 2013 @@ -307,7 +307,7 @@ CloseHandle(info->child_out_w); } -char* escape_quotes(char* arg, unsigned int arglen) +char *escape_quotes(char *arg, unsigned int arglen) { /* Ported from: @@ -317,7 +317,7 @@ I hate coding things like this, there might be an off-by-one error somewhere. */ - char* ret; + char *ret; unsigned int i; unsigned int rpos = 0; unsigned int apos = 0; Modified: nmap-exp/d33tah/ncat-lua/ncat/test/test-escapeargs.c ============================================================================== --- nmap-exp/d33tah/ncat-lua/ncat/test/test-escapeargs.c (original) +++ nmap-exp/d33tah/ncat-lua/ncat/test/test-escapeargs.c Fri Jun 28 15:14:41 2013 @@ -18,25 +18,25 @@ int success_count = 0, failure_count = 0; -char* testcase0[] = { NULL }; -char* testcase1[] = {"", NULL}; -char* testcase2[] = {"", "", NULL}; -char* testcase3[] = {"1", "2", "3", "4", NULL}; -char* testcase4[] = {"a", "b", "c", NULL}; -char* testcase5[] = {"a b", "c", NULL}; -char* testcase6[] = {"a b c", NULL}; -char* testcase7[] = {" a b c ", NULL}; -char* testcase8[] = {"\"quote\"", NULL}; -char* testcase9[] = {"back\\slash", NULL}; -char* testcase10[] = {"backslash at end\\", NULL}; -char* testcase11[] = {"double\"\"quote", NULL}; -char* testcase12[] = {" a\nb\tc\rd\ne", NULL}; -char* testcase13[] = {"..\\test\\toupper.lua", NULL}; -char* testcase14[] = {"backslash at end\\", "som\\ething\"af\te\r", NULL}; -char* testcase15[] = {"three\\\\\\backslashes", "som\\ething\"af\te\r", NULL}; -char* testcase16[] = {"three\"\"\"quotes", "som\\ething\"af\te\r", NULL}; +char *testcase0[] = { NULL }; +char *testcase1[] = {"", NULL}; +char *testcase2[] = {"", "", NULL}; +char *testcase3[] = {"1", "2", "3", "4", NULL}; +char *testcase4[] = {"a", "b", "c", NULL}; +char *testcase5[] = {"a b", "c", NULL}; +char *testcase6[] = {"a b c", NULL}; +char *testcase7[] = {" a b c ", NULL}; +char *testcase8[] = {"\"quote\"", NULL}; +char *testcase9[] = {"back\\slash", NULL}; +char *testcase10[] = {"backslash at end\\", NULL}; +char *testcase11[] = {"double\"\"quote", NULL}; +char *testcase12[] = {" a\nb\tc\rd\ne", NULL}; +char *testcase13[] = {"..\\test\\toupper.lua", NULL}; +char *testcase14[] = {"backslash at end\\", "som\\ething\"af\te\r", NULL}; +char *testcase15[] = {"three\\\\\\backslashes", "som\\ething\"af\te\r", NULL}; +char *testcase16[] = {"three\"\"\"quotes", "som\\ething\"af\te\r", NULL}; -char** expected_results[] = { +char **expected_results[] = { testcase0, testcase1, testcase2, @@ -57,7 +57,7 @@ NULL }; -LPWSTR cstring_to_wchar(char* input) +LPWSTR cstring_to_wchar(char *input) { int call_result, our_size; LPWSTR converted_result; @@ -73,7 +73,7 @@ return converted_result; } -char* get_flat_result(char** current_testcase) +char *get_flat_result(char **current_testcase) { char *flat_result = "", *single_escaped; int entry_number = 0; @@ -85,9 +85,9 @@ return flat_result; } -int run_test(char** current_testcase) +int run_test(char **current_testcase) { - char* flat_result; + char *flat_result; int i, failed = 0, result_size; LPWSTR converted_result, *result; _______________________________________________ Sent through the svn mailing list http://nmap.org/mailman/listinfo/svn
This one makes me wonder. Shouldn't it be char *arg then? _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [nmap-svn] r31128 - in nmap-exp/d33tah/ncat-lua/ncat: . test Jacek Wielemborek (Jun 28)