[PATCH v1] apparmor: Convert to use match_string() helper
J Freyensee
why2jjj.linux at gmail.com
Tue May 8 16:45:57 UTC 2018
return 0;
> - }
> - }
> + i = match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
> + if (i < 0)
> + return -EINVAL;
Slight nitpick: according to the Linux kernel documentation,
match_string() will return -EINVAL on failure. You could probably just
return 'i' if it's less than 0 and not explicitly return -EINVAL.
But good job replacing the code with a re-usable library call :-).
Reviewed-by: Jay Freyensee <why2jjj.linux at gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the Linux-security-module-archive
mailing list