aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-04-28 13:44:53 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-05-29 15:21:10 +0000
commitd554b89f4096589d00abef584552eff0481418db (patch)
treeb2194168f27b435510e20b16acf3d29177e21f58
parent22a0912bb1dc71f18d2e33ec9915a54a8324a3ff (diff)
MAC/do: check_proc(): Remove a superfluous 'if'
No functional change (intended). Reviewed by: bapt MFC after: 1 month Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
-rw-r--r--sys/security/mac_do/mac_do.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c
index 9da7aaa257d5..5aacce1b4d09 100644
--- a/sys/security/mac_do/mac_do.c
+++ b/sys/security/mac_do/mac_do.c
@@ -2303,12 +2303,11 @@ check_proc(void)
conf = find_conf(td_pr, &pr);
exec_paths = &conf->exec_paths;
- if (exec_paths->exec_path_count > 0)
- for (int i = 0; i < exec_paths->exec_path_count; i++)
- if (strcmp(exec_paths->exec_paths[i], path) == 0) {
- error = 0;
- break;
- }
+ for (int i = 0; i < exec_paths->exec_path_count; i++)
+ if (strcmp(exec_paths->exec_paths[i], path) == 0) {
+ error = 0;
+ break;
+ }
prison_unlock(pr);