]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
integrity: remove unneeded initializations in integrity_iint_cache entries
authorJeff Layton <jlayton@redhat.com>
Thu, 6 Jul 2017 14:54:21 +0000 (10:54 -0400)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Mon, 18 Dec 2017 14:43:49 +0000 (09:43 -0500)
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: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/iint.c

index d726ba23a17881dea99acc0ad0e0dc93144c8ec5..fc38ca08dbb54bd588430736199a6a21dda19b32 100644 (file)
@@ -153,15 +153,11 @@ static void init_once(void *foo)
        struct integrity_iint_cache *iint = foo;
 
        memset(iint, 0, sizeof(*iint));
-       iint->version = 0;
-       iint->flags = 0UL;
-       iint->atomic_flags = 0;
        iint->ima_file_status = INTEGRITY_UNKNOWN;
        iint->ima_mmap_status = INTEGRITY_UNKNOWN;
        iint->ima_bprm_status = INTEGRITY_UNKNOWN;
        iint->ima_read_status = INTEGRITY_UNKNOWN;
        iint->evm_status = INTEGRITY_UNKNOWN;
-       iint->measured_pcrs = 0;
        mutex_init(&iint->mutex);
 }