diff options
author | unknown <marko@hundin.mysql.fi> | 2005-06-22 12:36:24 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-06-22 12:36:24 +0300 |
commit | 25436b693d1b9d414e131ba121020e74c1f4afd6 (patch) | |
tree | 905c3919d739c5a93185d374ae6d7f2fca3052d9 /innobase/btr | |
parent | e4346cae0a64c896f0560ec2ccb6b37ef3bb9ef4 (diff) | |
download | mariadb-git-25436b693d1b9d414e131ba121020e74c1f4afd6.tar.gz |
InnoDB: Replace for loops with memset() where possible.
innobase/btr/btr0cur.c:
Replace for loop with memset()
innobase/buf/buf0buf.c:
buf_print(): Remove for loop for initializing counts[].
Similar to index_ids[], the elements of this array will
be initialized when they are allocated, i.e., counts[n_found++] = 1.
innobase/os/os0file.c:
Replace for loop with memset()
innobase/page/page0page.c:
Replace for loop with memset()
innobase/trx/trx0rec.c:
Replace for loop with memset()
Diffstat (limited to 'innobase/btr')
-rw-r--r-- | innobase/btr/btr0cur.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c index 98d90ecf18a..4ae27f007d6 100644 --- a/innobase/btr/btr0cur.c +++ b/innobase/btr/btr0cur.c @@ -2847,9 +2847,7 @@ btr_estimate_number_of_different_key_vals( n_diff = mem_alloc((n_cols + 1) * sizeof(ib_longlong)); - for (j = 0; j <= n_cols; j++) { - n_diff[j] = 0; - } + memset(n_diff, 0, (n_cols + 1) * sizeof(ib_longlong)); /* We sample some pages in the index to get an estimate */ |