浏览代码

Format code

bel2125 8 年之前
父节点
当前提交
0be394f23d
共有 2 个文件被更改,包括 11 次插入10 次删除
  1. 1 1
      src/handle_form.inl
  2. 10 9
      test/public_server.c

+ 1 - 1
src/handle_form.inl

@@ -601,7 +601,7 @@ mg_handle_form_request(struct mg_connection *conn,
 					d++;
 				}
 				if ((d > 0) && (buf[d] == '-')) {
-                    memmove(buf, buf + d, (unsigned)buf_fill - (unsigned)d);
+					memmove(buf, buf + d, (unsigned)buf_fill - (unsigned)d);
 					buf_fill -= d;
 					buf[buf_fill] = 0;
 				}

+ 10 - 9
test/public_server.c

@@ -1400,20 +1400,21 @@ START_TEST(test_request_handlers)
 
 /* Check if CGI test executable exists */
 #if defined(_WIN32)
-        sprintf(cmd_buf, "%s\\cgi_test.cgi", locate_test_exes());
+	sprintf(cmd_buf, "%scgi_test.cgi", locate_test_exes());
 #else
-	sprintf(cmd_buf, "%s/cgi_test.cgi", locate_test_exes());
+	sprintf(cmd_buf, "%scgi_test.cgi", locate_test_exes());
 #endif
-        memset(&st, 0, sizeof(st));
-        if (stat(cmd_buf, &st) != 0) {
+	memset(&st, 0, sizeof(st));
+	if (stat(cmd_buf, &st) != 0) {
 		fprintf(stderr, "\nFile %s not found\n", cmd_buf);
-		fprintf(stderr, "This file needs to be compiled manually before "
-                                "starting the test\n");
 		fprintf(stderr,
-                        "e.g. by gcc test/cgi_test.c -o output/cgi_test.cgi\n\n");
-                ck_abort_msg("Mandatory file %s must be built before starting the test",
+		        "This file needs to be compiled manually before "
+		        "starting the test\n");
+		fprintf(stderr,
+		        "e.g. by gcc test/cgi_test.c -o output/cgi_test.cgi\n\n");
+		ck_abort_msg("Mandatory file %s must be built before starting the test",
 		             cmd_buf);
-        }
+	}
 
 
 /* Test with CGI test executable */