]> git.ozlabs.org Git - ccan-lca-2011.git/blobdiff - tools/ccanlint/ccanlint.c
ccanlint: minor print formatting cleanup.
[ccan-lca-2011.git] / tools / ccanlint / ccanlint.c
index fb3e4d140fe378108f23b4d0042f5ec41a6fd645..8f36c2aa521f2d3c2132c508e367a1376fbbe2fa 100644 (file)
@@ -59,7 +59,7 @@ static void indent_print(const char *string)
 
 bool ask(const char *question)
 {
-       char reply[2];
+       char reply[80];
 
        printf("%s ", question);
        fflush(stdout);
@@ -153,7 +153,8 @@ static bool run_test(struct ccanlint *i,
                struct file_error *f;
 
                if (score->error)
-                       printf("%s:\n", score->error);
+                       printf("%s%s\n", score->error,
+                              list_empty(&score->per_file_errors) ? "" : ":");
 
                list_for_each(&score->per_file_errors, f, list) {
                        if (f->line)