mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
device_mapper: join flags checks together
Just use a single bitmask flag check and OR fields together.
This commit is contained in:
parent
fd9f7d10ca
commit
9c9953dc3e
@ -4371,9 +4371,10 @@ static int _row_compare(const void *a, const void *b)
|
|||||||
for (cnt = 0; cnt < rowa->rh->keys_count; cnt++) {
|
for (cnt = 0; cnt < rowa->rh->keys_count; cnt++) {
|
||||||
sfa = (*rowa->sort_fields)[cnt];
|
sfa = (*rowa->sort_fields)[cnt];
|
||||||
sfb = (*rowb->sort_fields)[cnt];
|
sfb = (*rowb->sort_fields)[cnt];
|
||||||
if ((sfa->props->flags & DM_REPORT_FIELD_TYPE_NUMBER) ||
|
if (sfa->props->flags &
|
||||||
(sfa->props->flags & DM_REPORT_FIELD_TYPE_SIZE) ||
|
((DM_REPORT_FIELD_TYPE_NUMBER) |
|
||||||
(sfa->props->flags & DM_REPORT_FIELD_TYPE_TIME)) {
|
(DM_REPORT_FIELD_TYPE_SIZE) |
|
||||||
|
(DM_REPORT_FIELD_TYPE_TIME))) {
|
||||||
const uint64_t numa =
|
const uint64_t numa =
|
||||||
*(const uint64_t *) sfa->sort_value;
|
*(const uint64_t *) sfa->sort_value;
|
||||||
const uint64_t numb =
|
const uint64_t numb =
|
||||||
|
@ -4369,9 +4369,10 @@ static int _row_compare(const void *a, const void *b)
|
|||||||
for (cnt = 0; cnt < rowa->rh->keys_count; cnt++) {
|
for (cnt = 0; cnt < rowa->rh->keys_count; cnt++) {
|
||||||
sfa = (*rowa->sort_fields)[cnt];
|
sfa = (*rowa->sort_fields)[cnt];
|
||||||
sfb = (*rowb->sort_fields)[cnt];
|
sfb = (*rowb->sort_fields)[cnt];
|
||||||
if ((sfa->props->flags & DM_REPORT_FIELD_TYPE_NUMBER) ||
|
if (sfa->props->flags &
|
||||||
(sfa->props->flags & DM_REPORT_FIELD_TYPE_SIZE) ||
|
((DM_REPORT_FIELD_TYPE_NUMBER) |
|
||||||
(sfa->props->flags & DM_REPORT_FIELD_TYPE_TIME)) {
|
(DM_REPORT_FIELD_TYPE_SIZE) |
|
||||||
|
(DM_REPORT_FIELD_TYPE_TIME))) {
|
||||||
const uint64_t numa =
|
const uint64_t numa =
|
||||||
*(const uint64_t *) sfa->sort_value;
|
*(const uint64_t *) sfa->sort_value;
|
||||||
const uint64_t numb =
|
const uint64_t numb =
|
||||||
|
Loading…
Reference in New Issue
Block a user