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()
This commit is contained in:
unknown 2005-06-22 12:36:24 +03:00
commit 369da8f539
5 changed files with 6 additions and 19 deletions

View file

@ -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. */