about summary refs log tree commit diff homepage
path: root/tools/gen-bout
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2019-08-15 12:18:57 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-08-15 15:50:46 +0100
commitae521364b55dc4e47dc9248cdc6035e7bfa3070e (patch)
tree77dec04ecd8effcbb9c99b80dca8b6d1b2a84e3e /tools/gen-bout
parent8c99f6e1ba894ee1b10fdbc290b8834ef3a6550c (diff)
downloadklee-ae521364b55dc4e47dc9248cdc6035e7bfa3070e.tar.gz
replace fprintf with fputs/fputc
Diffstat (limited to 'tools/gen-bout')
-rw-r--r--tools/gen-bout/gen-bout.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/tools/gen-bout/gen-bout.cpp b/tools/gen-bout/gen-bout.cpp
index 477c302b..f6f11f2a 100644
--- a/tools/gen-bout/gen-bout.cpp
+++ b/tools/gen-bout/gen-bout.cpp
@@ -49,23 +49,15 @@ static void push_range(KTest *b, const char *name, unsigned value) {
 
 void print_usage_and_exit(char *program_name) {
   fprintf(stderr,
-          "%s: Tool for generating a ktest file from concrete input, "
-          "e.g., for using a concrete crashing input as a ktest seed.\n"
-          "Usage: %s <arguments>\n"
-          "       <arguments> are the command-line arguments of the "
-          "program, with the following treated as special:\n"
-          "       --bout-file <filename>      - Specifying the output "
-          "file name for the ktest file (default: file.bout).\n"
-          "       --sym-stdin <filename>      - Specifying a file that "
-          "is the content of stdin (only once).\n"
-          "       --sym-stdout <filename>     - Specifying a file that "
-          "is the content of stdout (only once).\n"
-          "       --sym-file <filename>       - Specifying a file that "
-          "is the content of a file named A provided for the program "
-          "(only once).\n"
-          "   Ex: %s -o -p -q file1 --sym-stdin file2 --sym-file file3 "
-          "--sym-stdout file4\n",
-          program_name, program_name, program_name);
+    "%s: Tool for generating a ktest file from concrete input, e.g., for using a concrete crashing input as a ktest seed.\n"
+    "Usage: %s <arguments>\n"
+    "       <arguments> are the command-line arguments of the program, with the following treated as special:\n"
+    "       --bout-file <filename>      - Specifying the output file name for the ktest file (default: file.bout).\n"
+    "       --sym-stdin <filename>      - Specifying a file that is the content of stdin (only once).\n"
+    "       --sym-stdout <filename>     - Specifying a file that is the content of stdout (only once).\n"
+    "       --sym-file <filename>       - Specifying a file that is the content of a file named A provided for the program (only once).\n"
+    "   Ex: %s -o -p -q file1 --sym-stdin file2 --sym-file file3 --sym-stdout file4\n",
+    program_name, program_name, program_name);
   exit(1);
 }
 
@@ -163,7 +155,7 @@ int main(int argc, char *argv[]) {
 
     unsigned char *file_content, *fptr;
     if ((file_content = (unsigned char *)malloc(nbytes)) == NULL) {
-      fprintf(stderr, "Memory allocation failure\n");
+      fputs("Memory allocation failure\n", stderr);
       exit(1);
     }
 
@@ -204,7 +196,7 @@ int main(int argc, char *argv[]) {
 
     unsigned char *file_content, *fptr;
     if ((file_content = (unsigned char *)malloc(file_stat.st_size)) == NULL) {
-      fprintf(stderr, "Memory allocation failure\n");
+      fputs("Memory allocation failure\n", stderr);
       exit(1);
     }