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>
This commit is contained in:
Bartosz Golaszewski 2014-01-18 15:25:58 +01:00 committed by Denys Vlasenko
parent 49111cdc4f
commit 1a4d9f6521

View File

@ -225,7 +225,7 @@ static int compare_keys(const void *xarg, const void *yarg)
y = *(char **)yarg; y = *(char **)yarg;
#endif #endif
/* Perform actual comparison */ /* Perform actual comparison */
switch (flags & 7) { switch (flags & (FLAG_n | FLAG_M | FLAG_g)) {
default: default:
bb_error_msg_and_die("unknown sort type"); bb_error_msg_and_die("unknown sort type");
break; break;