diff options
author | Jean-Baptiste Boric <jblbeurope@gmail.com> | 2021-07-08 18:04:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-09 20:15:40 +0200 |
commit | 3db168121496fa0550f1d132608cee6e6a2de1bb (patch) | |
tree | 2ee4d91453b359da978106b1e1441cdaf14f3111 /Userland/Utilities | |
parent | 897a7060757a0aba4e70b67d53a5c4b0e4c5f9ac (diff) | |
download | serenity-3db168121496fa0550f1d132608cee6e6a2de1bb.zip |
Utilities: Fix return value of expr
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/expr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Utilities/expr.cpp b/Userland/Utilities/expr.cpp index b2e9de5ce6..d8371d5318 100644 --- a/Userland/Utilities/expr.cpp +++ b/Userland/Utilities/expr.cpp @@ -31,7 +31,7 @@ template<typename Fmt, typename... Args> warn("ERROR: \e[31m"); warnln(StringView { fmt }, args...); warn("\e[0m"); - exit(1); + exit(2); } class Expression { @@ -569,12 +569,12 @@ int main(int argc, char** argv) { if (pledge("stdio", nullptr) < 0) { perror("pledge"); - return 1; + return 3; } if (unveil(nullptr, nullptr) < 0) { perror("unveil"); - return 1; + return 3; } if ((argc == 2 && "--help"sv == argv[1]) || argc == 1) @@ -596,5 +596,5 @@ int main(int argc, char** argv) outln("{}", expression->string()); break; } - return 0; + return expression->truth() ? 0 : 1; } |