summaryrefslogtreecommitdiff
path: root/innobase/page
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-06-22 12:36:24 +0300
committerunknown <marko@hundin.mysql.fi>2005-06-22 12:36:24 +0300
commit369da8f53903634549b818a706f61e40dd31b7d4 (patch)
tree905c3919d739c5a93185d374ae6d7f2fca3052d9 /innobase/page
parent283d42e52a4e06c7487b44247b592d6ffa537cd7 (diff)
downloadmariadb-git-369da8f53903634549b818a706f61e40dd31b7d4.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/page')
-rw-r--r--innobase/page/page0page.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/innobase/page/page0page.c b/innobase/page/page0page.c
index 9c957ac8554..1fe7f1d9356 100644
--- a/innobase/page/page0page.c
+++ b/innobase/page/page0page.c
@@ -1755,9 +1755,7 @@ page_validate(
records in the page record heap do not overlap */
buf = mem_heap_alloc(heap, UNIV_PAGE_SIZE);
- for (i = 0; i < UNIV_PAGE_SIZE; i++) {
- buf[i] = 0;
- }
+ memset(buf, 0, UNIV_PAGE_SIZE);
/* Check first that the record heap and the directory do not
overlap. */