mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
remove nested functions to compile with icc. addresses #1185
git-svn-id: file:///svn/tokudb.1131b+1080a+1185@6367 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
abd7a99014
commit
c1b8cc718e
2 changed files with 8 additions and 9 deletions
|
@ -37,6 +37,10 @@ void expect(DBC *cursor, int k, int v) {
|
|||
free(val.data);
|
||||
}
|
||||
|
||||
static int mycmp(const void *a, const void *b) {
|
||||
return memcmp(a, b, sizeof (int));
|
||||
}
|
||||
|
||||
/* verify that key insertions are stored in insert order */
|
||||
void test_insert(int n, int dup_mode) {
|
||||
if (verbose) printf("test_insert:%d %d\n", n, dup_mode);
|
||||
|
@ -66,9 +70,6 @@ void test_insert(int n, int dup_mode) {
|
|||
int sortvalues[n];
|
||||
for (i=0; i<n; i++)
|
||||
sortvalues[i] = values[i];
|
||||
int mycmp(const void *a, const void *b) {
|
||||
return memcmp(a, b, sizeof (int));
|
||||
}
|
||||
qsort(sortvalues, n, sizeof sortvalues[0], mycmp);
|
||||
|
||||
/* insert n-1 unique keys {0, 1, n-1} - {n/2} */
|
||||
|
@ -165,9 +166,6 @@ void test_nonleaf_insert(int n, int dup_mode) {
|
|||
int sortvalues[n];
|
||||
for (i=0; i<n; i++)
|
||||
sortvalues[i] = values[i];
|
||||
int mycmp(const void *a, const void *b) {
|
||||
return memcmp(a, b, sizeof (int));
|
||||
}
|
||||
qsort(sortvalues, n, sizeof sortvalues[0], mycmp);
|
||||
|
||||
/* insert n-1 unique keys {0, 1, n-1} - {n/2} */
|
||||
|
|
|
@ -32,6 +32,10 @@ void expect_cursor_get(DBC *cursor, int op, int expectr) {
|
|||
assert(r == expectr);
|
||||
}
|
||||
|
||||
static int mycmp(const void *a, const void *b) {
|
||||
return memcmp(a, b, sizeof (int));
|
||||
}
|
||||
|
||||
void test_dupsort_delete(int n) {
|
||||
if (verbose) printf("test_dupsort_delete:%d\n", n);
|
||||
|
||||
|
@ -56,9 +60,6 @@ void test_dupsort_delete(int n) {
|
|||
int sortvalues[n];
|
||||
for (i=0; i<n; i++)
|
||||
sortvalues[i] = values[i];
|
||||
int mycmp(const void *a, const void *b) {
|
||||
return memcmp(a, b, sizeof (int));
|
||||
}
|
||||
qsort(sortvalues, n, sizeof sortvalues[0], mycmp);
|
||||
|
||||
for (i=0; i<n; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue