diff options
author | root <root> | 2009-06-13 14:58:33 +0000 |
---|---|---|
committer | root <root> | 2009-06-13 14:58:33 +0000 |
commit | 17ae00914756419ccbbc460c94a016d5457989a8 (patch) | |
tree | f4d60b2eee4db8f8198890ccf0c3c1de7b065e9d | |
parent | 11a7ad48b25e8abb1e9c610f780c3de618e2d224 (diff) |
3.23rel-3_23
-rw-r--r-- | eio.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1070,7 +1070,7 @@ eio_dent_sort (eio_dirent *dents, int size) { int min = 0; - for (i = size > EIO_QSORT_SKIP ? EIO_QSORT_CUTOFF : size; --i; ) + for (i = size > EIO_QSORT_SKIP ? EIO_QSORT_CUTOFF + 1 : size; --i; ) if (EIO_DENT_CMP (dents [i], <, dents [min])) min = i; @@ -1086,7 +1086,10 @@ eio_dent_sort (eio_dirent *dents, int size) eio_dirent value = dents [i]; for (j = i - 1; EIO_DENT_CMP (dents [j], >, value); --j) + { + assert (j >= 0); dents [j + 1] = dents [j]; + } dents [j + 1] = value; } |