summaryrefslogtreecommitdiff
path: root/innobase/os/os0file.c
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/os/os0file.c
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/os/os0file.c')
-rw-r--r--innobase/os/os0file.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 8102f24f25a..c68f5738798 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -1672,7 +1672,6 @@ os_file_set_size(
ibool ret;
byte* buf;
byte* buf2;
- ulint i;
ut_a(size == (size & 0xFFFFFFFF));
@@ -1685,9 +1684,7 @@ os_file_set_size(
buf = ut_align(buf2, UNIV_PAGE_SIZE);
/* Write buffer full of zeros */
- for (i = 0; i < UNIV_PAGE_SIZE * 512; i++) {
- buf[i] = '\0';
- }
+ memset(buf, 0, UNIV_PAGE_SIZE * 512);
offset = 0;
low = (ib_longlong)size + (((ib_longlong)size_high) << 32);