aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartekgola@gmail.com>2014-01-18 15:25:58 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2014-01-19 06:47:06 +0100
commit1a4d9f652169afa08680d3ff2c2cf9efa2a76a1b (patch)
treeedcc7c11796ad4e29a6ecea1cf3ac689e40e233e /coreutils
parent49111cdc4f58c844e315befb10b4b3db830eb143 (diff)
downloadbusybox-1a4d9f652169afa08680d3ff2c2cf9efa2a76a1b.tar.gz
sort.c: remove a magic number from compare_keys()
Use bitwise OR of proper flags instead. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c
index a1625fc9c..0b3b650c9 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -225,7 +225,7 @@ static int compare_keys(const void *xarg, const void *yarg)
y = *(char **)yarg;
#endif
/* Perform actual comparison */
- switch (flags & 7) {
+ switch (flags & (FLAG_n | FLAG_M | FLAG_g)) {
default:
bb_error_msg_and_die("unknown sort type");
break;