mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
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:
parent
283d42e52a
commit
369da8f539
5 changed files with 6 additions and 19 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue