From dc491ecee9b95aa7467ba4edc8820f02b2b2c076 Mon Sep 17 00:00:00 2001 From: semarie Date: Sat, 2 Oct 2021 14:05:10 +0000 Subject: [PATCH] remove dead variable from sys___realpath() it is a leftover from LOCKPARENT removal in NDINIT() (in rev 1.337) ok mpi@ --- sys/kern/vfs_syscalls.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3a5db48992e..51861367a45 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.352 2021/07/16 07:59:38 claudio Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.353 2021/10/02 14:05:10 semarie Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -862,7 +862,7 @@ sys___realpath(struct proc *p, void *v, register_t *retval) syscallarg(const char *) pathname; syscallarg(char *) resolved; } */ *uap = v; - char *pathname, *c; + char *pathname; char *rpbuf; struct nameidata nd; size_t pathlen; @@ -916,11 +916,6 @@ sys___realpath(struct proc *p, void *v, register_t *retval) free(cwdbuf, M_TEMP, cwdlen); } - /* find root "/" or "//" */ - for (c = pathname; *c != '\0'; c++) { - if (*c != '/') - break; - } NDINIT(&nd, LOOKUP, FOLLOW | SAVENAME | REALPATH, UIO_SYSSPACE, pathname, p); -- 2.20.1