summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2010-05-20 02:32:03 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2010-05-20 02:32:03 +0000
commit758c571d3045f51579c1d61a5a7deaca9e09e51d (patch)
treea86235044a870cc45191e9165db72262a96a0142
parentd23208c1a87e345b22ab8f2275b765bee20f6b7d (diff)
Don't dereference cp to shut gcc4 up (the intent anyway).
ok drahn oga
-rw-r--r--sys/kern/vfs_lookup.c7
1 files changed, 3 insertions, 4 deletions
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;