From 758c571d3045f51579c1d61a5a7deaca9e09e51d Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 20 May 2010 02:32:03 +0000 Subject: Don't dereference cp to shut gcc4 up (the intent anyway). ok drahn oga --- sys/kern/vfs_lookup.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/kern/vfs_lookup.c') diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 72b20887cb9..e6a351d3c04 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.41 2010/05/19 08:31:23 thib Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.42 2010/05/20 02:32:02 marco Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -369,9 +369,8 @@ dirloop: /* XXX: Figure out the length of the last component. */ cp = cnp->cn_nameptr; - while (*cp && (*cp != '/')) { - *cp++; - } + while (*cp && (*cp != '/')) + cp++; cnp->cn_namelen = cp - cnp->cn_nameptr; if (cnp->cn_namelen > NAME_MAX) { error = ENAMETOOLONG; -- cgit v1.2.3