Skip to content

Commit b9c42ac

Browse files
kbuild test robotJames Morris
authored andcommitted
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: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
1 parent 08eff49 commit b9c42ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎security/apparmor/lib.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix,
180180
} else
181181
policy->hname = kstrdup(name, gfp);
182182
if (!policy->hname)
183-
return 0;
183+
return false;
184184
/* base.name is a substring of fqname */
185185
policy->name = basename(policy->hname);
186186
INIT_LIST_HEAD(&policy->list);
187187
INIT_LIST_HEAD(&policy->profiles);
188188

189-
return 1;
189+
return true;
190190
}
191191

192192
/**

0 commit comments

Comments
 (0)