mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
efivarfs: Use sizeof() instead of magic number
Instead of adding a magic 4 to the variable size, use sizeof() to make it explicitly clear what the quantity represents (the variable's attributes). CC: Jeremy Kerr <[email protected]> Cc: Chun-Yi Lee <[email protected]> Cc: Andy Whitcroft <[email protected]> Reported-by: Lingzhu Xiang <[email protected]> Signed-off-by: Matt Fleming <[email protected]>
This commit is contained in:
parent
deb94101c4
commit
94a193fb73
1 changed files with 1 additions and 1 deletions
|
|
@ -1076,7 +1076,7 @@ static int efivarfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
inode->i_private = entry;
|
||||
i_size_write(inode, size+4);
|
||||
i_size_write(inode, size + sizeof(entry->var.Attributes));
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
d_add(dentry, inode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue