summaryrefslogtreecommitdiff
path: root/sys/kern/kern_unveil.c
diff options
context:
space:
mode:
authoranton <anton@cvs.openbsd.org>2020-03-19 14:01:58 +0000
committeranton <anton@cvs.openbsd.org>2020-03-19 14:01:58 +0000
commitec2c01f2e1f74836bc7f344ffc40d4591c3fabb1 (patch)
treeb4938b0c89080f69d1bf7ac77438f89f82f508c2 /sys/kern/kern_unveil.c
parent5158c93ca872f18270b2f4e6b8f36d44a1df187b (diff)
Separate variable declaration and assignment. No functional change.
Requested by mpi@
Diffstat (limited to 'sys/kern/kern_unveil.c')
-rw-r--r--sys/kern/kern_unveil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_unveil.c b/sys/kern/kern_unveil.c
index 31a52b89d13..99feda509ff 100644
--- a/sys/kern/kern_unveil.c
+++ b/sys/kern/kern_unveil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_unveil.c,v 1.37 2020/03/19 13:55:20 anton Exp $ */
+/* $OpenBSD: kern_unveil.c,v 1.38 2020/03/19 14:01:57 anton Exp $ */
/*
* Copyright (c) 2017-2019 Bob Beck <beck@openbsd.org>
@@ -659,8 +659,9 @@ unveil_add(struct proc *p, struct nameidata *ndp, const char *permissions)
pr->ps_uvpcwd = unveil_lookup(p->p_fd->fd_cdir, pr, NULL);
if (pr->ps_uvpcwd == NULL) {
- ssize_t i = unveil_find_cover(p->p_fd->fd_cdir, p);
+ ssize_t i;
+ i = unveil_find_cover(p->p_fd->fd_cdir, p);
if (i >= 0)
pr->ps_uvpcwd = &pr->ps_uvpaths[i];
}