diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-15 16:45:44 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-08-16 16:42:03 +0200 |
commit | 033c9da00893e90dcff0a714bcb5d66890ad818a (patch) | |
tree | 393a43641ee656ae66f408b85c2f74c7bf23c35f /fs/udf/super.c | |
parent | ba2eb866a89df47d97893f8857d77e98c3c961e0 (diff) | |
download | linux-033c9da00893e90dcff0a714bcb5d66890ad818a.tar.gz linux-033c9da00893e90dcff0a714bcb5d66890ad818a.tar.bz2 linux-033c9da00893e90dcff0a714bcb5d66890ad818a.zip |
fs-udf: Improve six size determinations
Replace the specification of data structures by variable references
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r-- | fs/udf/super.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index 2c0844fae808..d772c9c676d0 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -266,8 +266,7 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count) { struct udf_sb_info *sbi = UDF_SB(sb); - sbi->s_partmaps = kcalloc(count, sizeof(struct udf_part_map), - GFP_KERNEL); + sbi->s_partmaps = kcalloc(count, sizeof(*sbi->s_partmaps), GFP_KERNEL); if (!sbi->s_partmaps) { udf_err(sb, "Unable to allocate space for %d partition maps\n", count); @@ -2100,7 +2099,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) uopt.fmode = UDF_INVALID_MODE; uopt.dmode = UDF_INVALID_MODE; - sbi = kzalloc(sizeof(struct udf_sb_info), GFP_KERNEL); + sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) return -ENOMEM; |