提交 02c324a5 编写于 作者: J Jeff Layton 提交者: Mimi Zohar

integrity: remove unneeded initializations in integrity_iint_cache entries

The init_once routine memsets the whole object to 0, and then
explicitly sets some of the fields to 0 again. Just remove the explicit
initializations.
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
上级 9c655be0
...@@ -153,15 +153,11 @@ static void init_once(void *foo) ...@@ -153,15 +153,11 @@ static void init_once(void *foo)
struct integrity_iint_cache *iint = foo; struct integrity_iint_cache *iint = foo;
memset(iint, 0, sizeof(*iint)); memset(iint, 0, sizeof(*iint));
iint->version = 0;
iint->flags = 0UL;
iint->atomic_flags = 0;
iint->ima_file_status = INTEGRITY_UNKNOWN; iint->ima_file_status = INTEGRITY_UNKNOWN;
iint->ima_mmap_status = INTEGRITY_UNKNOWN; iint->ima_mmap_status = INTEGRITY_UNKNOWN;
iint->ima_bprm_status = INTEGRITY_UNKNOWN; iint->ima_bprm_status = INTEGRITY_UNKNOWN;
iint->ima_read_status = INTEGRITY_UNKNOWN; iint->ima_read_status = INTEGRITY_UNKNOWN;
iint->evm_status = INTEGRITY_UNKNOWN; iint->evm_status = INTEGRITY_UNKNOWN;
iint->measured_pcrs = 0;
mutex_init(&iint->mutex); mutex_init(&iint->mutex);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册