HomeFreeBSD

MAC/do: parse_rules(): Copy input string on its own

Description

MAC/do: parse_rules(): Copy input string on its own

Since all callers have to do it, save them that burden and do it in
parse_rules() instead.

While here, replace "strlen(x) == 0" with the simpler and more efficient
"x[0] == '\0'".

Reviewed by: bapt
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47591

(cherry picked from commit 2200a3ec711baa98c20a4b65868957dc40912f0f)

Details

Provenance
olceAuthored on Jun 28 2024, 3:14 PM
Reviewer
bapt
Differential Revision
D47591: MAC/do: parse_rules(): Copy input string on its own
Parents
rGea3d86ea5774: MAC/do: Sort header inclusions
Branches
Unknown
Tags
Unknown