diff options
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r-- | llvm_mode/afl-clang-fast.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c index 2c25f4de..1925f5f8 100644 --- a/llvm_mode/afl-clang-fast.c +++ b/llvm_mode/afl-clang-fast.c @@ -375,20 +375,16 @@ static void edit_params(u32 argc, char** argv) { int main(int argc, char** argv) { - if (isatty(2) && !getenv("AFL_QUIET")) { + if (argc < 2 || strcmp(argv[1], "-h") == 0) { #ifdef USE_TRACE_PC - SAYF(cCYA "afl-clang-fast" VERSION cRST - " [tpcg] by <lszekeres@google.com>\n"); + printf(cCYA "afl-clang-fast" VERSION cRST + " [tpcg] by <lszekeres@google.com>\n" #else - SAYF(cCYA "afl-clang-fast" VERSION cRST " by <lszekeres@google.com>\n"); + printf(cCYA "afl-clang-fast" VERSION cRST " by <lszekeres@google.com>\n" #endif /* ^USE_TRACE_PC */ - - } - - if (argc < 2) { - - SAYF( + "\n" + "afl-clang-fast[++] [options]\n" "\n" "This is a helper application for afl-fuzz. It serves as a drop-in " "replacement\n" @@ -412,6 +408,15 @@ int main(int argc, char** argv) { exit(1); + } else if (isatty(2) && !getenv("AFL_QUIET")) { + +#ifdef USE_TRACE_PC + SAYF(cCYA "afl-clang-fast" VERSION cRST + " [tpcg] by <lszekeres@google.com>\n"); +#else + SAYF(cCYA "afl-clang-fast" VERSION cRST " by <lszekeres@google.com>\n"); +#endif /* ^USE_TRACE_PC */ + } find_obj(argv[0]); |