diff options
author | Rob Landley <rob@landley.net> | 2013-01-02 02:00:35 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-01-02 02:00:35 -0600 |
commit | 662a267c9b52f256b027d0f176a846b1d973ab99 (patch) | |
tree | 1ff58749c737a283a199e1e567894fe16a9d0ce5 /lib | |
parent | 090c5c607ec682e5cfc03bbc745cd1ed28d5d6ce (diff) | |
download | toybox-662a267c9b52f256b027d0f176a846b1d973ab99.tar.gz |
Have error_msg() and friends set TT.exitval to 1 if it's still 0, clean out other places that were setting it that no longer need to.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lib.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -26,6 +26,7 @@ void verror_msg(char *msg, int err, va_list va) else s+=2; if (err) fprintf(stderr, s, strerror(err)); putc('\n', stderr); + if (!toys.exitval) toys.exitval++; } void error_msg(char *msg, ...) @@ -61,7 +62,6 @@ void error_exit(char *msg, ...) verror_msg(msg, 0, va); va_end(va); - if (!toys.exitval) toys.exitval++; if (toys.rebound) longjmp(*toys.rebound, 1); else exit(toys.exitval); } @@ -76,7 +76,6 @@ void perror_exit(char *msg, ...) verror_msg(msg, errno, va); va_end(va); - if (!toys.exitval) toys.exitval++; if (toys.rebound) longjmp(*toys.rebound, 1); else exit(toys.exitval); } |