projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49111cd
)
sort.c: remove a magic number from compare_keys()
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Sat, 18 Jan 2014 14:25:58 +0000
(15:25 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 19 Jan 2014 05:47:06 +0000
(06:47 +0100)
Use bitwise OR of proper flags instead.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/sort.c
patch
|
blob
|
history
diff --git
a/coreutils/sort.c
b/coreutils/sort.c
index a1625fc9cdb30a6d332ba023ef901ff6abac172d..0b3b650c9de140163afcb451bef08da9721ebab4 100644
(file)
--- 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;