diff options
author | Matt Kraai <kraai@debian.org> | 2000-12-05 20:07:27 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-12-05 20:07:27 +0000 |
commit | deb9d4d76545ac68a1df6490f0c767cc11b44741 (patch) | |
tree | 78144fab0c5026eabbe0a7ac772881b388436fb4 /procps | |
parent | 4758368505c2951300650ddcc93de6c657b43d50 (diff) | |
download | busybox-w32-deb9d4d76545ac68a1df6490f0c767cc11b44741.tar.gz busybox-w32-deb9d4d76545ac68a1df6490f0c767cc11b44741.tar.bz2 busybox-w32-deb9d4d76545ac68a1df6490f0c767cc11b44741.zip |
Use perrorMsg and clean up exit status.
Diffstat (limited to 'procps')
-rw-r--r-- | procps/renice.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/procps/renice.c b/procps/renice.c index d79a64d1a..c81f31c5c 100644 --- a/procps/renice.c +++ b/procps/renice.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | extern int renice_main(int argc, char **argv) | 30 | extern int renice_main(int argc, char **argv) |
31 | { | 31 | { |
32 | int prio, err = 0; | 32 | int prio, status = EXIT_SUCCESS; |
33 | 33 | ||
34 | if (argc < 3) usage(renice_usage); | 34 | if (argc < 3) usage(renice_usage); |
35 | 35 | ||
@@ -44,10 +44,10 @@ extern int renice_main(int argc, char **argv) | |||
44 | if (setpriority(PRIO_PROCESS, ps, prio) == 0) { | 44 | if (setpriority(PRIO_PROCESS, ps, prio) == 0) { |
45 | printf("%d: old priority %d, new priority %d\n", ps, oldp, prio ); | 45 | printf("%d: old priority %d, new priority %d\n", ps, oldp, prio ); |
46 | } else { | 46 | } else { |
47 | fprintf(stderr, "renice: %d: setpriority: ", ps); | 47 | perrorMsg("%d: setpriority", ps); |
48 | perror(""); | 48 | status = EXIT_FAILURE; |
49 | err = 1; | ||
50 | } | 49 | } |
51 | } | 50 | } |
52 | exit(err); | 51 | |
52 | return status; | ||
53 | } | 53 | } |