提交 29d1c2b4 编写于 作者: C Colin Ian King 提交者: Mimi Zohar

ima: remove redundant initialization of pointer 'file'.

The pointer 'file' is being initialized with a value that is never read,
it is being re-assigned the same value later on closer to where it is
being first used. The initialization is redundant and can be removed.

Cleans up clang scan build warning:
security/integrity/ima/ima_main.c:434:15: warning: Value stored to 'file'
during its initialization is never read [deadcode.DeadStores]
Signed-off-by: NColin Ian King <colin.i.king@gmail.com>
Signed-off-by: NMimi Zohar <zohar@linux.ibm.com>
上级 31231092
...@@ -432,7 +432,7 @@ int ima_file_mmap(struct file *file, unsigned long prot) ...@@ -432,7 +432,7 @@ int ima_file_mmap(struct file *file, unsigned long prot)
int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot) int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
{ {
struct ima_template_desc *template = NULL; struct ima_template_desc *template = NULL;
struct file *file = vma->vm_file; struct file *file;
char filename[NAME_MAX]; char filename[NAME_MAX];
char *pathbuf = NULL; char *pathbuf = NULL;
const char *pathname = NULL; const char *pathname = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册