Skip to content

Commit

Permalink
Merge pull request #1001 from timkpaine/tkp/exitcode
Browse files Browse the repository at this point in the history
make utility executables exit with error code 0 when running --help
  • Loading branch information
alaindargelas authored Aug 14, 2023
2 parents 65cba5d + 4a932b6 commit 955290e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion util/uhdm-cmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static int32_t usage(const char *progName) {
<< " = 0, if input files are equal" << std::endl
<< " < 0, if input files are not equal" << std::endl
<< " > 0, for any failures" << std::endl;
return 1;
return 0;
}

int32_t main(int32_t argc, char **argv) {
Expand Down
2 changes: 1 addition & 1 deletion util/uhdm-dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int32_t usage(const char *progname) {
"\nIf golden file is given to compare, exit code represent if output "
"matches.\n");

return 1;
return 0;
}

int32_t main(int32_t argc, char **argv) {
Expand Down
2 changes: 1 addition & 1 deletion util/uhdm-hier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static int32_t usage(const char* progname) {
fprintf(stderr, "Usage:\n%s [options] <uhdm-file> ?--line?\n", progname);
fprintf(stderr,
"Reads UHDM binary representation and prints hierarchy tree.\n");
return 1;
return 0;
}

int32_t main(int32_t argc, char** argv) {
Expand Down
2 changes: 1 addition & 1 deletion util/uhdm-lint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static int32_t usage(const char *progName) {
<< std::endl
<< std::endl
<< "Exits with code" << std::endl;
return 1;
return 0;
}

class MyLinter : public UHDM::VpiListener {
Expand Down

0 comments on commit 955290e

Please sign in to comment.