]> Pileus Git - ~andy/linux/blobdiff - kernel/auditfilter.c
audit: use memset instead of trying to initialize field by field
[~andy/linux] / kernel / auditfilter.c
index f7aee8be7fb286db4a40919bc10ede18f17016dc..8a344cebd8bff225a9af523ba9fbc4fd656560cd 100644 (file)
@@ -423,7 +423,7 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
                f->lsm_rule = NULL;
 
                /* Support legacy tests for a valid loginuid */
-               if ((f->type == AUDIT_LOGINUID) && (f->val == ~0U)) {
+               if ((f->type == AUDIT_LOGINUID) && (f->val == AUDIT_UID_UNSET)) {
                        f->type = AUDIT_LOGINUID_SET;
                        f->val = 0;
                }