Skip to content

Commit

Permalink
apparmor: fix boolreturn.cocci warnings
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: John Johansen <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
kbuild test robot authored and James Morris committed Apr 6, 2017
1 parent 08eff49 commit b9c42ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/apparmor/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit b9c42ac

Please sign in to comment.