diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-14 19:05:02 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-14 19:05:02 +0100 |
commit | 996797855170685eccf0c3d9e56f819e94045938 (patch) | |
tree | 9f0799234068c74d229bb06ad46cb91332df9b41 /util-linux/renice.c | |
parent | 6f1c942a31fc517e0be53ccc55d5162b2c7806aa (diff) | |
download | busybox-w32-996797855170685eccf0c3d9e56f819e94045938.tar.gz busybox-w32-996797855170685eccf0c3d9e56f819e94045938.tar.bz2 busybox-w32-996797855170685eccf0c3d9e56f819e94045938.zip |
renice: use BUILD_BUG_ON()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/renice.c')
-rw-r--r-- | util-linux/renice.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/util-linux/renice.c b/util-linux/renice.c index 70c494b3d..65a80001b 100644 --- a/util-linux/renice.c +++ b/util-linux/renice.c | |||
@@ -42,10 +42,6 @@ | |||
42 | #include "libbb.h" | 42 | #include "libbb.h" |
43 | #include <sys/resource.h> | 43 | #include <sys/resource.h> |
44 | 44 | ||
45 | void BUG_bad_PRIO_PROCESS(void); | ||
46 | void BUG_bad_PRIO_PGRP(void); | ||
47 | void BUG_bad_PRIO_USER(void); | ||
48 | |||
49 | int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 45 | int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
50 | int renice_main(int argc UNUSED_PARAM, char **argv) | 46 | int renice_main(int argc UNUSED_PARAM, char **argv) |
51 | { | 47 | { |
@@ -59,12 +55,9 @@ int renice_main(int argc UNUSED_PARAM, char **argv) | |||
59 | char *arg; | 55 | char *arg; |
60 | 56 | ||
61 | /* Yes, they are not #defines in glibc 2.4! #if won't work */ | 57 | /* Yes, they are not #defines in glibc 2.4! #if won't work */ |
62 | if (PRIO_PROCESS < CHAR_MIN || PRIO_PROCESS > CHAR_MAX) | 58 | BUILD_BUG_ON(PRIO_PROCESS < CHAR_MIN || PRIO_PROCESS > CHAR_MAX); |
63 | BUG_bad_PRIO_PROCESS(); | 59 | BUILD_BUG_ON(PRIO_PGRP < CHAR_MIN || PRIO_PGRP > CHAR_MAX); |
64 | if (PRIO_PGRP < CHAR_MIN || PRIO_PGRP > CHAR_MAX) | 60 | BUILD_BUG_ON(PRIO_USER < CHAR_MIN || PRIO_USER > CHAR_MAX); |
65 | BUG_bad_PRIO_PGRP(); | ||
66 | if (PRIO_USER < CHAR_MIN || PRIO_USER > CHAR_MAX) | ||
67 | BUG_bad_PRIO_USER(); | ||
68 | 61 | ||
69 | arg = *++argv; | 62 | arg = *++argv; |
70 | 63 | ||