aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/renice.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/procps/renice.c b/procps/renice.c
index bcaa94cf1..65674a4ee 100644
--- a/procps/renice.c
+++ b/procps/renice.c
@@ -20,23 +20,11 @@
20 */ 20 */
21 21
22#include "busybox.h" 22#include "busybox.h"
23#include <stdio.h>
24#include <stdlib.h>
25#include <string.h>
26#include <limits.h>
27#include <errno.h>
28#include <unistd.h>
29#include <sys/resource.h> 23#include <sys/resource.h>
30 24
31#if (PRIO_PROCESS < CHAR_MIN) || (PRIO_PROCESS > CHAR_MAX) 25void BUG_bad_PRIO_PROCESS(void);
32#error Assumption violated : PRIO_PROCESS value 26void BUG_bad_PRIO_PGRP(void);
33#endif 27void BUG_bad_PRIO_USER(void);
34#if (PRIO_PGRP < CHAR_MIN) || (PRIO_PGRP > CHAR_MAX)
35#error Assumption violated : PRIO_PGRP value
36#endif
37#if (PRIO_USER < CHAR_MIN) || (PRIO_USER > CHAR_MAX)
38#error Assumption violated : PRIO_USER value
39#endif
40 28
41int renice_main(int argc, char **argv) 29int renice_main(int argc, char **argv)
42{ 30{
@@ -49,6 +37,14 @@ int renice_main(int argc, char **argv)
49 unsigned who; 37 unsigned who;
50 char *arg; 38 char *arg;
51 39
40 /* Yes, they are not #defines in glibc 2.4! #if won't work */
41 if (PRIO_PROCESS < CHAR_MIN || PRIO_PROCESS > CHAR_MAX)
42 BUG_bad_PRIO_PROCESS();
43 if (PRIO_PGRP < CHAR_MIN || PRIO_PGRP > CHAR_MAX)
44 BUG_bad_PRIO_PGRP();
45 if (PRIO_USER < CHAR_MIN || PRIO_USER > CHAR_MAX)
46 BUG_bad_PRIO_USER();
47
52 arg = *++argv; 48 arg = *++argv;
53 49
54 /* Check if we are using a relative adjustment. */ 50 /* Check if we are using a relative adjustment. */