summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorMohamed Ashiq <mliyazud@redhat.com>2015-07-15 14:19:49 +0530
committerJeff Darcy <jdarcy@redhat.com>2015-10-28 13:42:32 -0700
commit323e71617fee5020324540776d0d4469577f0afe (patch)
treec460a876c78c9d733c0e69967ff82f4e4ed251e1 /libglusterfs/src
parent3066a21caafab6305527991de11c8eb43ec0044c (diff)
cli : 'gluster volume help' output sorted alphabetically
'gluster volume help' output is not sorted alphabetically. This makes little harder for the user to search or get to know of few gluster volume commands usage just from gluster cli. Change-Id: I855da2e4748a5c2ff3be319c50fa9548d676ee8a BUG: 1242894 Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com> Reviewed-on: http://review.gluster.org/11663 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/common-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 303ee665440..2dcd54f1829 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -2442,8 +2442,8 @@ gf_array_insertionsort (void *A, int l, int r, size_t elem_size,
for(i = l; i < N; i++) {
Temp = gf_array_elem (A, i, elem_size);
j = i - 1;
- while((cmp (Temp, gf_array_elem (A, j, elem_size))
- < 0) && j>=0) {
+ while (j >= 0 && (cmp (Temp, gf_array_elem (A, j, elem_size))
+ < 0)) {
gf_elem_swap (Temp, gf_array_elem (A, j, elem_size),
elem_size);
Temp = gf_array_elem (A, j, elem_size);