mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
ba2eb866a8
commit
033c9da008
3 changed files with 6 additions and 7 deletions
|
@ -114,7 +114,7 @@ static void udf_update_extent_cache(struct inode *inode, loff_t estart,
|
|||
__udf_clear_extent_cache(inode);
|
||||
if (pos->bh)
|
||||
get_bh(pos->bh);
|
||||
memcpy(&iinfo->cached_extent.epos, pos, sizeof(struct extent_position));
|
||||
memcpy(&iinfo->cached_extent.epos, pos, sizeof(*pos));
|
||||
iinfo->cached_extent.lstart = estart;
|
||||
switch (iinfo->i_alloc_type) {
|
||||
case ICBTAG_FLAG_AD_SHORT:
|
||||
|
@ -1703,7 +1703,7 @@ static int udf_update_inode(struct inode *inode, int do_sync)
|
|||
dsea->impUseLength = cpu_to_le32(sizeof(struct regid));
|
||||
}
|
||||
eid = (struct regid *)dsea->impUse;
|
||||
memset(eid, 0, sizeof(struct regid));
|
||||
memset(eid, 0, sizeof(*eid));
|
||||
strcpy(eid->ident, UDF_ID_DEVELOPER);
|
||||
eid->identSuffix[0] = UDF_OS_CLASS_UNIX;
|
||||
eid->identSuffix[1] = UDF_OS_ID_LINUX;
|
||||
|
@ -1754,7 +1754,7 @@ static int udf_update_inode(struct inode *inode, int do_sync)
|
|||
udf_time_to_disk_stamp(&efe->createTime, iinfo->i_crtime);
|
||||
udf_time_to_disk_stamp(&efe->attrTime, inode->i_ctime);
|
||||
|
||||
memset(&(efe->impIdent), 0, sizeof(struct regid));
|
||||
memset(&(efe->impIdent), 0, sizeof(efe->impIdent));
|
||||
strcpy(efe->impIdent.ident, UDF_ID_DEVELOPER);
|
||||
efe->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX;
|
||||
efe->impIdent.identSuffix[1] = UDF_OS_ID_LINUX;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue