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:
parent
49111cdc4f
commit
1a4d9f6521
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user