Commit b9c42ac7 authored by kbuild test robot's avatar kbuild test robot Committed by James Morris
Browse files

apparmor: fix boolreturn.cocci warnings



security/apparmor/lib.c:132:9-10: WARNING: return of 0/1 in function 'aa_policy_init' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent 08eff49d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -180,13 +180,13 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix,
	} else
		policy->hname = kstrdup(name, gfp);
	if (!policy->hname)
		return 0;
		return false;
	/* base.name is a substring of fqname */
	policy->name = basename(policy->hname);
	INIT_LIST_HEAD(&policy->list);
	INIT_LIST_HEAD(&policy->profiles);

	return 1;
	return true;
}

/**