Use a temporary variable to avoid a duplicate strlen().

Submitted by:	kib
MFC after:	1 week
This commit is contained in:
Dag-Erling Smørgrav 2009-05-28 10:24:26 +00:00
parent cc4757ddef
commit 26088b9d4d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192973

View file

@ -364,12 +364,13 @@ pfs_vptocnp(struct vop_vptocnp_args *ap)
} }
bcopy(pidbuf, buf + i, len); bcopy(pidbuf, buf + i, len);
} else { } else {
i -= strlen(pd->pn_name); len = strlen(pd->pn_name);
i -= len;
if (i < 0) { if (i < 0) {
error = ENOMEM; error = ENOMEM;
goto failed; goto failed;
} }
bcopy(pd->pn_name, buf + i, strlen(pd->pn_name)); bcopy(pd->pn_name, buf + i, len);
} }
pn = pd->pn_parent; pn = pd->pn_parent;