summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-10-02 04:04:05 +0000
committerRoland McGrath <roland@gnu.org>2000-10-02 04:04:05 +0000
commit46f36edd321f10f66fa91ce5c0bc65eb9b6b813d (patch)
treee4225983d1c85c961c385d78a59f94c2a17cb89c /ext2fs
parenta8a87aeafb4db41a4a5f19f1a7e8ac24be340374 (diff)
2000-10-01 Roland McGrath <roland@frob.com>
* inode.c (write_node): Use memcpy instead of a loop.
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/inode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index b3f07df4..8b0e5db9 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -1,6 +1,6 @@
/* Inode management routines
- Copyright (C) 1994,95,96,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,96,97,98,99,2000 Free Software Foundation, Inc.
Converted for ext2fs by Miles Bader <miles@gnu.org>
@@ -488,11 +488,8 @@ write_node (struct node *np)
if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode))
di->i_block[0] = st->st_rdev;
else
- {
- int block;
- for (block = 0; block < EXT2_N_BLOCKS; block++)
- di->i_block[block] = np->dn->info.i_data[block];
- }
+ memcpy (di->i_block, np->dn->info.i_data,
+ EXT2_N_BLOCKS * sizeof di->i_block[0]);
diskfs_end_catch_exception ();
np->dn_stat_dirty = 0;