Browse Source

Joey's template fixes.

Rusty Russell 16 years ago
parent
commit
02336bbc25
2 changed files with 5 additions and 4 deletions
  1. 4 3
      tools/ccanlint/has_tests.c
  2. 1 1
      tools/ccanlint/no_info.c

+ 4 - 3
tools/ccanlint/has_tests.c

@@ -97,9 +97,9 @@ static void handle_no_tests(struct manifest *m, void *check_result)
 	fputs("#include \"tap/tap.h\"\n", run);
 	fputs("\n", run);
 
-	fputs("int main(int argc, char *argv[])\n", run);
+	fputs("int main(void)\n", run);
 	fputs("{\n", run);
-	fputs("\t/* This is how many tests you plan to run\n", run);
+	fputs("\t/* This is how many tests you plan to run */\n", run);
 	fputs("\tplan_tests(3);\n", run);
 	fputs("\n", run);
 	fputs("\t/* Simple thing we expect to succeed */\n", run);
@@ -116,7 +116,8 @@ static void handle_no_tests(struct manifest *m, void *check_result)
 	fputs("#endif\n", run);
 	fputs("\n", run);
 	fputs("\t/* This exits depending on whether all tests passed */\n", run);
-	fputs("\return exit_status()\n", run);
+	fputs("\treturn exit_status();\n", run);
+	fputs("}\n", run);
 
 	fclose(run);
 }	

+ 1 - 1
tools/ccanlint/no_info.c

@@ -40,7 +40,7 @@ static const char template[] =
 	" */\n"
 	"int main(int argc, char *argv[])\n"
 	"{\n"
-	"	/* Expect exactly one argument\n"
+	"	/* Expect exactly one argument */\n"
 	"	if (argc != 2)\n"
 	"		return 1;\n"
 	"\n"