diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2016-07-14 20:12:22 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2016-07-14 20:12:22 +0200 |
commit | 44012db6350b51ad7e78f286dfa6e5d4ae84f807 (patch) | |
tree | 8dfef1aecad87a3a6f7e10c921120dc3f1d23a9c /storage/connect/csort.cpp | |
parent | f2dded9bac48de391cdd796283769691872ba911 (diff) | |
download | mariadb-git-44012db6350b51ad7e78f286dfa6e5d4ae84f807.tar.gz |
All changes made on 10.1 for last 11 commits
Diffstat (limited to 'storage/connect/csort.cpp')
-rw-r--r-- | storage/connect/csort.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/storage/connect/csort.cpp b/storage/connect/csort.cpp index 2f918782c80..13f325d8f3f 100644 --- a/storage/connect/csort.cpp +++ b/storage/connect/csort.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier Bertrand 1995-2012 */ +/* (C) Copyright to the author Olivier Bertrand 1995-2016 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -721,8 +721,8 @@ int CSORT::Qsortc(void) void CSORT::Qstc(int *base, int *max) { register int *i, *j, *jj, *lt, *eq, *gt, *mid; - int c, lo, hi, rc; - size_t zlo, zhi, cnm; + int c = 0, lo, hi, rc; + size_t zlo, zhi, cnm; zlo = zhi = cnm = 0; // Avoid warning message @@ -774,8 +774,11 @@ void CSORT::Qstc(int *base, int *max) /*****************************************************************/ /* Small group. Do special quicker processing. */ /*****************************************************************/ - if ((rc = Qcompare(base, (i = base + 1))) > 0) - c = *base, *base = *i, *i = c; + if ((rc = Qcompare(base, (i = base + 1))) > 0) { + c = *base; + *base = *i; + *i = c; + } // endif rc if (Pof) Pof[base - Pex] = Pof[i - Pex] = (rc) ? 1 : 2; |