diff options
author | 2010-05-20 02:32:02 +0000 | |
---|---|---|
committer | 2010-05-20 02:32:02 +0000 | |
commit | e4c89004796caac12efd2ec552a9e1c856c522d0 (patch) | |
tree | 966b7393d999800daa33da3f2cdfa2129a133a95 | |
parent | Escape "=", remove if 0'd out code and simplify check in x_print_expansions. (diff) | |
download | wireguard-openbsd-e4c89004796caac12efd2ec552a9e1c856c522d0.tar.xz wireguard-openbsd-e4c89004796caac12efd2ec552a9e1c856c522d0.zip |
Don't dereference cp to shut gcc4 up (the intent anyway).
ok drahn oga
-rw-r--r-- | sys/kern/vfs_lookup.c | 7 |
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; |