summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko2018-01-14 19:05:02 +0100
committerDenys Vlasenko2018-01-14 19:05:02 +0100
commit996797855170685eccf0c3d9e56f819e94045938 (patch)
tree9f0799234068c74d229bb06ad46cb91332df9b41 /util-linux
parent6f1c942a31fc517e0be53ccc55d5162b2c7806aa (diff)
downloadbusybox-996797855170685eccf0c3d9e56f819e94045938.zip
busybox-996797855170685eccf0c3d9e56f819e94045938.tar.gz
renice: use BUILD_BUG_ON()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/renice.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/util-linux/renice.c b/util-linux/renice.c
index 70c494b..65a8000 100644
--- a/util-linux/renice.c
+++ b/util-linux/renice.c
@@ -42,10 +42,6 @@
#include "libbb.h"
#include <sys/resource.h>
-void BUG_bad_PRIO_PROCESS(void);
-void BUG_bad_PRIO_PGRP(void);
-void BUG_bad_PRIO_USER(void);
-
int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int renice_main(int argc UNUSED_PARAM, char **argv)
{
@@ -59,12 +55,9 @@ int renice_main(int argc UNUSED_PARAM, char **argv)
char *arg;
/* Yes, they are not #defines in glibc 2.4! #if won't work */
- if (PRIO_PROCESS < CHAR_MIN || PRIO_PROCESS > CHAR_MAX)
- BUG_bad_PRIO_PROCESS();
- if (PRIO_PGRP < CHAR_MIN || PRIO_PGRP > CHAR_MAX)
- BUG_bad_PRIO_PGRP();
- if (PRIO_USER < CHAR_MIN || PRIO_USER > CHAR_MAX)
- BUG_bad_PRIO_USER();
+ BUILD_BUG_ON(PRIO_PROCESS < CHAR_MIN || PRIO_PROCESS > CHAR_MAX);
+ BUILD_BUG_ON(PRIO_PGRP < CHAR_MIN || PRIO_PGRP > CHAR_MAX);
+ BUILD_BUG_ON(PRIO_USER < CHAR_MIN || PRIO_USER > CHAR_MAX);
arg = *++argv;