aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/shim.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-10 02:23:34 +0900
committerOphestra <cat@gensokyo.uk>2025-10-10 02:23:34 +0900
commit22ee5ae151fa991cf23dbf1b3efb5a0d6fb9b092 (patch)
treef0bac6b7a1d52af021f9e48c9d04cb371f291a0e /internal/app/shim.go
parent4246256d781f169b86f76d8654f6df5ffc6ddae6 (diff)
internal/app: filter ops in implementation
This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/shim.go')
-rw-r--r--internal/app/shim.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/app/shim.go b/internal/app/shim.go
index 27305e66..9cf515c8 100644
--- a/internal/app/shim.go
+++ b/internal/app/shim.go
@@ -48,11 +48,7 @@ type shimParams struct {
}
// valid checks shimParams to be safe for use.
-func (p *shimParams) valid() bool {
- return p != nil &&
- p.Ops != nil &&
- p.PrivPID > 0
-}
+func (p *shimParams) valid() bool { return p != nil && p.PrivPID > 0 }
// ShimMain is the main function of the shim process and runs as the unconstrained target user.
func ShimMain() {