This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

use ascending sort, not descending

  • Loading branch information...
tomato42 committed Aug 5, 2012
1 parent b3e7218 commit 2e3876c3eba048a51ca170be169f585d7163a4cd
Showing with 4 additions and 4 deletions.
  1. +4 −4 lvmls.c
View
@@ -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.