Skip to content
Browse files

use ascending sort, not descending

  • Loading branch information...
1 parent b3e7218 commit 2e3876c3eba048a51ca170be169f585d7163a4cd @tomato42 committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 lvmls.c
View
8 lvmls.c
@@ -61,9 +61,9 @@ _compare_segments(const void *a, const void *b)
if (alloc_a->lv_start == alloc_b->lv_start)
return 0;
else if (alloc_a->lv_start > alloc_b->lv_start)
- return -1;
- else
return 1;
+ else
+ return -1;
}
static int
@@ -87,9 +87,9 @@ _find_segment(const void *key, const void *b)
&& alloc_a->lv_start < alloc_b->lv_start + alloc_b->pv_length)
return 0;
else if (alloc_a->lv_start > alloc_b->lv_start)
- return -1;
- else
return 1;
+ else
+ return -1;
}
void sort_segments(struct pv_allocations *segments, size_t nmemb)

0 comments on commit 2e3876c

Please sign in to comment.
Something went wrong with that request. Please try again.