debugreiserfs: fix incorrect memset size in unpack_stat_data

The memsets to initialize the stat data items were using the
size of the pointer rather than the structure.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
Jeff Mahoney committed 2014-01-23 17:42:45 -05:00
1 parent c3084a6d48
commit 31a4390ca6
1 file changed
+2 -2
+2 -2
View File
@@ -164,7 +164,7 @@ static void unpack_stat_data(struct packed_item *pi, struct buffer_head *bh,
struct stat_data_v1 *sd;
sd = (struct stat_data_v1 *)ih_item_body(bh, ih);
memset(sd, 0, sizeof(sd));
memset(sd, 0, sizeof(*sd));
fread16(&sd->sd_mode);
fread16(&sd->sd_nlink);
@@ -186,7 +186,7 @@ static void unpack_stat_data(struct packed_item *pi, struct buffer_head *bh,
struct stat_data *sd;
sd = (struct stat_data *)ih_item_body(bh, ih);
memset(sd, 0, sizeof(sd));
memset(sd, 0, sizeof(*sd));
fread16(&sd->sd_mode);