Date: Mon, 29 Jun 2026 19:25:37 +0000 From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 34980adcb4db - stable/15 - MAC/do: check_proc(): Remove a superfluous 'if' Message-ID: <6a42c6b1.2251f.1d3cf38e@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=34980adcb4db4a75448d4f3026827d8b32904f2f commit 34980adcb4db4a75448d4f3026827d8b32904f2f Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2026-04-28 13:44:53 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2026-06-29 19:23:39 +0000 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 (cherry picked from commit d554b89f4096589d00abef584552eff0481418db) --- sys/security/mac_do/mac_do.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 16f7d90f031b..0e715d576a16 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -2305,12 +2305,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);home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a42c6b1.2251f.1d3cf38e>
